LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-02-2006, 02:33 PM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 63
Question 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).

 
Old 07-02-2006, 06:47 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 58
doesnt it list the interface? can you post the rules here?
 
Old 07-02-2006, 10:05 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
You should get more info if you use -v as well - e.g. iptables -L -v
 
Old 07-03-2006, 06:21 AM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Original Poster
Rep: Reputation: 63
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
 
Old 07-03-2006, 02:11 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
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
 
  


Reply

Tags
interfaces, iptables, multiple, viewing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM
iptables rules puding Linux - Networking 2 08-09-2004 10:46 PM
iptables rules Fatz Linux - Security 1 08-05-2004 06:04 AM
IPTables rules dkny01 Linux - Networking 6 10-23-2003 12:52 AM
iptables rules Darin Linux - Security 1 01-23-2003 04:32 PM


All times are GMT -5. The time now is 11:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration