Skip to contentSkip to conversation

block traffic between two subnets

DISCUSSION [email protected] 2 participants 3 messages Jul 7, 2005

lore
Share & tools
lore
#0 lore raw

Hello,
I have two subnets :

eth1 192.168.0.0/24
eth2 192.168.21.0/24

I would like block all traffic between eth1 and eth2.

How to write a rule ?

Thanks

Varun

#1 lore raw
Quoted 9 lines

Hello,
I have two subnets :

eth1 192.168.0.0/24
eth2 192.168.21.0/24

I would like block all traffic between eth1 and eth2.

How to write a rule ?

iptables -A INPUT -j REJECT -i eth1 -o eth2
iptables -A INPUT -j REJECT -i eth2 -o eth1

Jan Engelhardt

Signature · 1 line
| Alphagate Systems, http://alphagate.hopto.org/
#2 lore raw
Quoted 7 lines
Quoted 4 lines

eth1 192.168.0.0/24
eth2 192.168.21.0/24
I would like block all traffic between eth1 and eth2. How to write a rule ?

iptables -A INPUT -j REJECT -i eth1 -o eth2
iptables -A INPUT -j REJECT -i eth2 -o eth1

Should have been -A FORWARD ...