From: "akshaysalkar" <akshaysalkar@indiatimes.com>
To: netfilter@lists.netfilter.org
Subject: iptables forward rulesets woes
Date: Wed, 24 Sep 2003 10:35:49 +0530 [thread overview]
Message-ID: <200309240448.KAA10542@WS0005.indiatimes.com> (raw)
i was refering to the book on linux net admin by olaf kirch
the example gives
'a organization having a firewall machine to allow internal users to be able to access WWW servers on the internet but no other traffic to be passed'
the iptable rules given are
iptables -F FORWARD
iptables -P FORWARD DROP
iptables -A FORWARD -m tcp -p tcp -s 0/0 --sport 80 -d 172.16.1.0/24 --syn -j DROP
iptables -A FORWARD -m tcp -p tcp -s 172.16.1.0/24 --sport 80 -d 0/0 -j ACCEPT
iptables -A FORWARD -m tcp -p tcp -d 172.16.1.0/24 --dport 80 -s 0/0 -j ACCEPT
i dont kinda understand this...
firstly 2nd line whats the -P. i guess its the default policy. but i could have given as
iptables -A FORWARD -j DROP
2nddly 3rd line why the -j DROP i thought it should be ACCEPT
3rdly since it says access the WWW servers on the internet why is it that on the 4th linethe --sport is 80
the source doesnt necessarily have to be 80 it could be any unprivileged port. the --dport should be infact 80
and the last line also seems confusing to me. where the -d is the network-ip
please help me/ suggest.
regards
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com
Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to http://airsahara.indiatimes.com and Bid Now !
next reply other threads:[~2003-09-24 5:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-24 5:05 akshaysalkar [this message]
2003-09-24 5:49 ` iptables forward rulesets woes Rob Sterenborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200309240448.KAA10542@WS0005.indiatimes.com \
--to=akshaysalkar@indiatimes.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox