From: Payal Rathod <payal-iptables@staticky.com>
To: Daniel Chemko <dchemko@smgtec.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: can someone check this simple firewall?
Date: Fri, 15 Aug 2003 23:25:24 +0530 [thread overview]
Message-ID: <20030815175524.GB2393@linux.local> (raw)
In-Reply-To: <7C9884991ADAE0479C14F10C858BCDF5122E21@alderaan.smgtec.com>
Thanks a lot for the detailed explanation.
Comments inline.
On Wed, Aug 13, 2003 at 03:39:39PM -0700, Daniel Chemko wrote:
> ->> You probably want at least:
> ->> modprobe ipt_conntrack_ftp
> ->> modprobe ipt_nat_ftp
ok.
> $IPTABLES -F
> $IPTABLES -F -t nat
>
> ->> Set this AFTER you have setup all your rules, otherwise you have a
> hole for hackers to reach through while applying rules
?????? But this will erase all the rules which we have set if you do it
at last.
> ->> Should instead be a related rule:
> ->> $IPTABLES -A INPUT -i lo -j ACCEPT # All Outbounds are ok
> ->> $IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT #
Got it. Great.
> ->>Only TCP connections, not UDP and -s 0/0 is redundant
> $IPTABLES -A INPUT -p tcp -s 0/0 --dport 21 -j ACCEPT
[...]
Ok. A bit OT here, but why not UDP? /etc/services lists udp also for the
same.
> $IPTABLES -A INPUT -p udp -s 0/0 --dport 80 -j ACCEPT
> ->> This will not work for responses. Use this as well:
> ->> $IPTABLES -A INPUT -p icmp --icmp-type 0 -j ACCEPT if you want
> internet pings from the firewall to work
> $IPTABLES -A INPUT -p icmp -s $LAN_IP_RANGE -j ACCEPT
What is wrong with my rules?
> ->> This section is not needed. Set:
> ->> iptables -P OUTPUT ACCEPT
Ok. Then why not the same for FORWARD chain too? Since we are forwarding
everything from LAN outside as well?
If we want people to just do ftp and nothing else, will this be ok,
iptables -P FORWARD DROP
iptables -A FORWARD -p tcp -s 192.168.10.0/24 -d 0/0 --dport 21 -j ACCEPT
Thanks a lot for the wonderful explanation.
With warm regards,
-Payal
--
"Visit GNU/Linux Success Stories"
http://payal.staticky.com
Guest-Book Section Updated.
next prev parent reply other threads:[~2003-08-15 17:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-13 22:39 can someone check this simple firewall? Daniel Chemko
2003-08-15 17:55 ` Payal Rathod [this message]
2003-08-14 19:36 ` Can someone please explain to a newbie? Stephen J. McCracken
-- strict thread matches above, loose matches on Subject: below --
2003-08-14 18:28 can someone check this simple firewall? Payal Rathod
2003-08-13 18:58 ` Gavin Hamill
2003-08-14 10:18 ` Ralf Spenneberg
2003-08-14 11:01 ` Chris Wilson
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=20030815175524.GB2393@linux.local \
--to=payal-iptables@staticky.com \
--cc=dchemko@smgtec.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.