LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2013, 02:37 PM   #1
CeSinge
LQ Newbie
 
Registered: Feb 2013
Location: East of Brussels, Belgium
Distribution: debian 2.6.32-5-xen-amd64 at Rackspace.com
Posts: 5

Rep: Reputation: 0
Why doesn't iptables -L show the interfaces?


Hello,

I hesitated between the newbie forum - who I am, mostly - and this one... In configuring a basic iptables, I had amongst others:
iptables -A INPUT -i lo -j ACCEPT

Now, when checking my config with iptables -L, I saw a scary:
ACCEPT all -- anywhere anywhere
corresponding to the above line.
Googling this up, I saw that iptables -S does show the interface indeed, so my command was correct.

But why wouldn't iptables -L show the interface? The output seems rather useless to newbie-me!
 
Old 02-07-2013, 02:45 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
don't know. Just add a -v for more details.
 
Old 02-07-2013, 03:30 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Moved: This thread is more suitable in the Linux Newbie forum and has been moved accordingly to help your thread/question get the exposure it deserves.

*If you want output to be as verbose as possible try 'iptables --line-numbers -nvxL'. Listing multiple tables is done easiest using 'iptables-save' or with 'cat /proc/net/ip_tables_names|xargs -iX iptables -t 'X' --line-numbers -nvxL'.
 
Old 02-11-2013, 03:18 AM   #4
CeSinge
LQ Newbie
 
Registered: Feb 2013
Location: East of Brussels, Belgium
Distribution: debian 2.6.32-5-xen-amd64 at Rackspace.com
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you! I was sick a few days - couldn't come to this earlier. I still wonder in fact why the interfaces are not shown automatically with the most default parameters, given that all firewalls that I know - and iptables seems no different - apply policies on the interfaces, not on the system as a whole.
 
Old 02-11-2013, 06:41 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Not necessarily, policies (as in "-P") are applied to the default chains of a table plus you could apply policies (as in filtering) by exclusion. For example if you explicitly set up in and egress filtering for the loop back device and leave device names out in consecutive rules they would apply to any other device.
 
  


Reply


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
gtkmm: show() doesn't show the window when adding windows from other places than main() Hvl Programming 0 06-21-2012 10:54 AM
iptables virtual interfaces sparkey Linux - Security 0 11-12-2010 07:19 PM
iptables and virtual interfaces redhat_help Linux - Security 2 03-19-2006 04:24 PM
iptables on rh9 with 3 interfaces doza Linux - Networking 0 08-05-2005 03:54 PM
1 nic, 2 interfaces show up.. grcore Linux - Hardware 8 01-08-2005 02:46 PM


All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration