Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IPTables Help

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
I need to block all communication between eth1 and eth2, but allow all traffic to go through eth0 for both. How do I set up a firewall rule to do this? I have been playing with this for over a month and I can't find anything or get anything to work. No I don't fully understand it, that is why I am seeking help.

Please help me,


iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux. The Programmer's Knowledge Base ->
 
[tt]iptables -A INPUT -i eth1 -o eth2 -j DROP
iptables -A INPUT -i eth2 -o eth1 -j DROP[/tt]
should do it, I think.

//Daniel
 
That didn't work for me.

Actually, I don't know how good it is, but I got it to work.

iptables -A INPUT -s 10.1.1.0/255.255.255.0 -d 10.1.2.0/255.255.255.0 -j DROP
iptables -A INPUT -s 10.1.2.0/255.255.255.0 -d 10.1.1.0/255.255.255.0 -j DROP
iptables -A OUTPUT -s 10.1.1.0/255.255.255.0 -d 10.1.2.0/255.255.255.0 -j DROP
iptables -A OUTPUT -s 10.1.2.0/255.255.255.0 -d 10.1.1.0/255.255.255.0 -j DROP
iptables -A FORWARD -i eth1 -o eth2 -j DROP
iptables -A FORWARD -i eth2 -o eth1 -j DROP

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
[pc2]
See my progress to converting to linux. The Programmer's Knowledge Base ->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top