Linux Netfilter discussions
 help / color / mirror / Atom feed
* Re: Firewall IP change
@ 2004-07-26 13:43 Antony Stone
  2004-07-26 14:03 ` Distributed firewall Gianni Mantellini
  0 siblings, 1 reply; 3+ messages in thread
From: Antony Stone @ 2004-07-26 13:43 UTC (permalink / raw)
  To: netfilter

On Monday 26 July 2004 2:20 pm, Frédéric Gonzatti wrote:

> Thanks Antony,
>
> According to your explanations I think I 'd rather to include the following
> line in my iptable script :
> iptables -A POSTROUTING -t nat -o eth2 -j SNAT --to 62.160.X.Y
>
> But to be sure : I've got two computers on my DMZ which have IP included in
> 192.168.2.0/255.255.255.0 and other computers on my LAN which have IP
> included in 172.16.0.0/255.255.0.0  and static public IP on my WAN
> Firewall. So the best way is to use the line you advice me ?

Yes.

> Where on my script do I have to add this line ? At the beginning, just
> after a modprobe iptable_nat line ?

I like to put it just before or just after the FORWARD rules, because it's for 
packets which are being routed through the firewall.

> Last question : Do you see some clumsy things or errors in my script ?
> Unfortunately I think there are .... ;-(

You have approximately twice as many rules as I would expect to see - you are 
allowing each individual protocol (defined by its source port)n in an 
ESTABLISHED rule; most people would just use one ESTABLISHED rule to allow 
all reply packets, no matter which protocol.

Also you have specific rules for FTP data connection on port 20 - better to 
just leave these out and handle the packets as RELATED to the control 
connection on port 21.

I prefer a simple ruleset if possible because it's easier to work with.

Regards,

Antony.

-- 
The difference between theory and practice is that in theory there is no 
difference, whereas in practice there is.

                                                     Please reply to the list;
                                                           please don't CC me.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-07-28  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <40FBC3C900163BC5@vsmtp2.tin.it>
2004-07-26 14:20 ` Distributed firewall Antony Stone
2004-07-28  9:09 ` Craig Steadman
2004-07-26 13:43 Firewall IP change Antony Stone
2004-07-26 14:03 ` Distributed firewall Gianni Mantellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox