LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-24-2006, 08:58 AM   #1
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Rep: Reputation: 30
Question IPTABLES Question


This line:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED

Just to verify.... this means that if a connection has already connected don't check each packet? Or is this saying allow everything?

I am just wondering because I added it to improve the performance of my firewall because I have an extensive block list. Now Snort is picking up bad traffic from IP's I have already blocked.

Thanks for your input...
 
Old 05-24-2006, 11:28 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
FWIW, I like the
Code:
iptables -nvL
listing a little better (seems more clear to me).

Have a look at the manpages for iptables for exact definitions on what RELATED and ESTABLISHED mean. But it sounds like you have the gist of it (in your first question anyway).

Also, remember that with an INPUT chain policy of ACCEPT, you're going to ACCEPT any packets that don't match other rules in the chain....
 
Old 05-25-2006, 12:25 PM   #3
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
Wink

Thank you, I thought that was the case. I am starting to understand this animal (that's the scary part)
 
Old 06-02-2006, 11:30 AM   #4
ThisGuyIKnow
Member
 
Registered: Mar 2006
Posts: 43

Rep: Reputation: 15
Hi,

I also wanted to give thanks to anomie for the little tidbit on using iptables w/ options -nvL. I'm using SuSEfirewall2 and was simply using iptables -L to look at my rules. When looking at the first rule of my INPUT chain it didn't make sense why my firewall was working:

Code:
Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere
I thought "holy #$*&! Accept all packets from anywhere to anywhere?" But I tested my firewall and saw in my logs that it was indeed dropping things that it was supposed to drop. Then I browsed around LQ and found this thread and ran iptables -nvL:

Code:
Chain INPUT (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
   40  2512 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0
"Oh, accept all packets on the loopback interface... whew!"

 
  


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
iptables question lsu420luv General 2 03-23-2006 10:38 AM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
IPTables question THE RADICAL Linux - Security 4 12-15-2005 03:12 AM
Question on Iptables jspsandhu Linux - Security 3 06-04-2005 08:09 PM
iptables question Ipolit Slackware 2 06-01-2005 03:27 PM

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

All times are GMT -5. The time now is 10:15 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
Open Source Consulting | Domain Registration