Multihomed firewall/router
I have a firewall/router performing snat. This is its configuration.
eth1-192.168.1.0/24
/
Internet--eth0-firewall-eth2-192.168.2.0/24
\
eth3-192.168.3.0/24My iptables setup is successfully blocking connections from eth0. However, I need to segregate the internal subnets from each other because the belong to different organizations. No matter what I try I can't seem to block pings from one subnet to another. I can lock it down to only allow input access to the interface the subnet is directly connected to, but I need to provide dns access to eth1 and this breaks when I do this.
The firewall is running a caching dns server(djbdns) on eth1. It also provides dhcp leases, and ntp services on eth1-3.
I have also noticed that when I flush the tables and delete the chains. Nat is still provided, i.e. I can still connect to the internet.
Any pointers or help would be greatly appreciated.
Jeremy Hendrickson
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
Quoted 20 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: Saturday, 31 January 2004 00:21
To: [email protected]
Subject: Multihomed firewall/routerI have a firewall/router performing snat. This is its configuration.
eth1-192.168.1.0/24 / Internet--eth0-firewall-eth2-192.168.2.0/24 \ eth3-192.168.3.0/24
Quoted 9 lines
My iptables setup is successfully blocking connections from eth0. However, I need to segregate the internal subnets from each other because the belong to different organizations. No matter what I try I can't seem to block pings from one subnet to another. I can lock it down to only allow input access to the interface the subnet is directly connected to, but I need to provide dns access to eth1 and this breaks when I do this.
It should be pretty simple. Basically, you want to stop forwarding:
iptables -t filter -P FORWARD DROP
Then you want to only allow forwarding out eth0 for external 'net traffic:
iptables -t filter -j ACCEPT -o eth0 -m state --satte NEW iptables -t filter -j ACCEPT -m state --state ESTABLISHED,RELATED
Translation:
Only allow 'new' to be forwarded to the real world, only allow existing or related back in.
eth[1-3] won't be able to talk to each other because of the Policy on the Forward chain.
The INPUT and OUTPUT chains don't really need any changing, as they aren't touched for talking between interfaces.
Quoted 7 lines
The firewall is running a caching dns server(djbdns) on eth1. It also provides dhcp leases, and ntp services on eth1-3.
I have also noticed that when I flush the tables and delete the chains. Nat is still provided, i.e. I can still connect to the internet.
This is because the NAT rules are in the 'nat' table, not in the 'filter' table.
Quoted 1 line
Any pointers or help would be greatly appreciated.
Hope this helps some..