Linux Netfilter discussions
 help / color / mirror / Atom feed
* Possible IPTables bug in INPUT interface filtering?
@ 2010-04-16  3:12 John Engelke
  2010-04-16 15:23 ` Pascal Hambourg
  2010-04-21 18:27 ` Narendra Choyal
  0 siblings, 2 replies; 7+ messages in thread
From: John Engelke @ 2010-04-16  3:12 UTC (permalink / raw)
  To: netfilter

Hello IPFilter Guru World,

I've encountered some strangeness in filtering on a multihomed Linux
box, CentOS 5, x86_64, 2.6.18-164.15.1.el5, where using the interface
flag (-i) does not work.

So this box has two interfaces on the local subnet, eth0 and eth1. I
would like to restrict VNC to only one of the interfaces, eth1. At the
start, VNC does not work. So I add this:

-A INPUT -i eth1 -p tcp -m multiport --port 5900 -j ACCEPT

Then, VNC starts working on eth0 AND eth1. Since I know the address of
eth1, I then put it in explicitly as:

-A INPUT -i eth1 -p tcp -d 192.168.1.34 -m multiport --port 5900 -j ACCEPT

Amazingly, this works and now VNC traffic is only allowed on eth1
(address 192.168.1.34). So I believe I am concluding correctly that
interface filtering *does not work* for INPUT statements in multihomed
machines. I also wonder if it does not work at all for any interface.

This is with IPTables 1.3.5. It is a real PITA since I have to rewrite
all my rules for specific IPs and then bind my adapters to those IPs.
Any meaninful comments are appreciated, even if I am really off base
here.

Thanks!

-- IngyHere

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

end of thread, other threads:[~2010-04-21 22:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-16  3:12 Possible IPTables bug in INPUT interface filtering? John Engelke
2010-04-16 15:23 ` Pascal Hambourg
2010-04-19 22:15   ` John Engelke
2010-04-20 10:37     ` Pascal Hambourg
2010-04-21 18:27 ` Narendra Choyal
2010-04-21 21:30   ` Richard Horton
2010-04-21 22:10     ` Jan Engelhardt

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