LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   what are the iptables rules to each interface ? (http://www.linuxquestions.org/questions/linux-networking-3/what-are-the-iptables-rules-to-each-interface-460337/)

marozsas 07-02-2006 02:33 PM

what are the iptables rules to each interface ?
 
Hi dear fellows,

I would like to know what are the iptables rules that are active for the several interfaces in my server.

My server is a gateway and it has 3 interfaces on it (local, external, and DMZ).
The iptable's -L option, list the rules that are in place in this gateway, but I can't see how to associate each rule to an interface. The iptable's i option is valid only to build a rule. It is not valid when listing the rules (-L).

:confused:

nadroj 07-02-2006 06:47 PM

doesnt it list the interface? can you post the rules here?

gilead 07-02-2006 10:05 PM

You should get more info if you use -v as well - e.g. iptables -L -v

marozsas 07-03-2006 06:21 AM

Thanks guys !

The -v flag shows the in/out interface for each rule. All I need to do is filter the output with grep to show only the rules for the interface I am interest at.

I read the iptables man pages several times, and my mind was stucked on looking for a iptables flag/option to show only the interface I want. I never realized I can filter it later.

anyway, thanks for the answers. They really make me to see the obvious.

I guess I am not thinking right since Brazil is out of World Cup :)

gilead 07-03-2006 02:11 PM

I'm glad you've got it working :)

As far as the world cup goes... When Australia was beaten by Italy, one of the guys I work with (he's from England) wore an Italian team souvenir shirt he'd bought for the occasion. Not surprisingly, we'd pinned several Portugese flags to the wall above his desk before he got to work yesterday ;)


All times are GMT -5. The time now is 04:24 PM.