LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-06-2009, 10:03 AM   #1
sang_froid
Member
 
Registered: Oct 2006
Posts: 179

Rep: Reputation: 15
iptables question


Hi,
when I run iptables -L in my box, it enlists as below:

ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:5353
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:135


isn't the first rule going to bypass all the remaining rules ?? In my view after the first rule gets processed, then all of the remaining rules never get processed as it allows everything... Am i correct ?
 
Old 10-06-2009, 01:28 PM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by sang_froid View Post
Hi,
when I run iptables -L in my box, it enlists as below:

ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:5353
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:135


isn't the first rule going to bypass all the remaining rules ?? In my view after the first rule gets processed, then all of the remaining rules never get processed as it allows everything... Am i correct ?
yes - correct.

a good way to test is run

Code:
iptables -L -n -v
to see which rules packet/byte counters are incrementing

with such a rule, there is not much point in having a firewall running
 
Old 10-06-2009, 02:16 PM   #3
adm1329
Member
 
Registered: Mar 2004
Distribution: CentOS 5
Posts: 128

Rep: Reputation: 17
Quote:
Originally Posted by sang_froid View Post
Hi,
when I run iptables -L in my box, it enlists as below:

ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:5353
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:135


isn't the first rule going to bypass all the remaining rules ?? In my view after the first rule gets processed, then all of the remaining rules never get processed as it allows everything... Am i correct ?
This is probably for your local loopback, if it's not there then you have to specify what ports on your machine your machine can connect to (this would cause a major headache if it would even work).
 
Old 10-06-2009, 02:49 PM   #4
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
adm1329 is probably correct that it is your loopback interface.

However if you'd like to post your actual iptables file we can take a look at it.

Looking at what you posted I only see allow rules, so I am hoping that the default action for that chain is DROP?

nomb
 
  


Reply



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 question Hammett Linux - Networking 8 09-09-2007 06:38 PM
Another IPtables question brianbek Linux - Networking 1 03-07-2005 01:04 PM
iptables question enrique_arong Linux - Newbie 9 09-27-2004 02:53 PM
Question on IPTABLES brokenflea Linux - Networking 3 02-10-2004 09:53 PM
Iptables question.. pembo13 Linux - Networking 2 09-24-2003 05:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:47 AM.

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
Open Source Consulting | Domain Registration