Hi everybody,
I have a Debian Wheezy with three network interfaces:
eth0 has the public facing ip address.
eth1 is our local LAN. (network: 192.168.2.0/24)
eth2 only has one device directly connected to it, a Wireless Access Point (network: 192.168.100.0/24)
The wireless access point is for our guests. They can use it to access the internet (which is working)
but should not be able to access any machines inside our LAN (not working, 192.168.100.0 clients
can access 192.168.2.0)
I tried iptables rule:
iptables -A INPUT -i eth2 -s 192.168.100.0/24 -d 192.168.2.0/24 -j DROP
Thanks
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Prevent routing between two network segments
- ralph.ronnquist
- Posts: 342
- Joined: 2015-12-19 01:07
- Location: Melbourne, Australia
- Been thanked: 6 times
Re: Prevent routing between two network segments
You should have that rule in the FORWARD chain rather, or as well. The INPUT chain applies to input packets to the machine itself only.
My favourite illustrations of this are http://jensd.be/wp-content/uploads/iptables_chains.png and http://www.linuxjournal.com/files/linux ... 0822f1.png. Search iptables-chains.png images for more.
My favourite illustrations of this are http://jensd.be/wp-content/uploads/iptables_chains.png and http://www.linuxjournal.com/files/linux ... 0822f1.png. Search iptables-chains.png images for more.
Re: Prevent routing between two network segments
OK... thanks for the advice. I will try it. And let you know how it went.
Re: Prevent routing between two network segments
Hi Ralph,
These rules did the trick:
iptables -A OUTPUT -s 192.168.100.0/24 -d 192.168.2.0/24 -j DROP
iptables -A INPUT -i eth2 -s 192.168.100.0/24 -d 192.168.2.0/24 -j DROP
iptables -A FORWARD -i eth2 -s 192.168.100.0/24 -d 192.168.2.0/24 -j DROP
Thanks so much for your help.
These rules did the trick:
iptables -A OUTPUT -s 192.168.100.0/24 -d 192.168.2.0/24 -j DROP
iptables -A INPUT -i eth2 -s 192.168.100.0/24 -d 192.168.2.0/24 -j DROP
iptables -A FORWARD -i eth2 -s 192.168.100.0/24 -d 192.168.2.0/24 -j DROP
Thanks so much for your help.