I added a rule to iptables, how can I see existing rules?

This is a discussion on I added a rule to iptables, how can I see existing rules? within the Linux Security forums, part of the System Security and Security Related category; I added a rule to iptables, how can I veridy my rule was added?. Also how can I see existing ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-24-2004
Santa
 
Posts: n/a
Default I added a rule to iptables, how can I see existing rules?

I added a rule to iptables, how can I veridy my rule was added?. Also
how can I see existing iptables rules?. Can I see some prints in
/var/log/messages when rule gets executed?.

If anybody know more on iptables, could you write me two sentences
about how it will work?. Appreciated.
Reply With Quote
  #2 (permalink)  
Old 11-24-2004
Tim Haynes
 
Posts: n/a
Default Re: I added a rule to iptables, how can I see existing rules?

santa19992000@yahoo.com (Santa) writes:

> I added a rule to iptables, how can I veridy my rule was added?. Also
> how can I see existing iptables rules?.


iptables -nL

> Can I see some prints in /var/log/messages when rule gets executed?.


Well, if you've got a LOG rule in there, you'll see that in an appropriate
logfile (however your syslog of choice handles the relevant level).

> If anybody know more on iptables, could you write me two sentences
> about how it will work?. Appreciated.


Read the documentation at <http://www.netfilter.org/>.

~Tim
--
A Celtic fire, a soul of white |piglet@stirfried.vegetable.org.uk
|http://spodzone.org.uk/cesspit
Reply With Quote
  #3 (permalink)  
Old 11-24-2004
David Barnsdale
 
Posts: n/a
Default Re: I added a rule to iptables, how can I see existing rules?

On Wed, 24 Nov 2004 11:09:49 -0800, Santa wrote:

> I added a rule to iptables, how can I veridy my rule was added?. Also
> how can I see existing iptables rules?.


iptables -L -v -n

You don't need the -v and the -n but
without the -v (verbose) the listed
output can be misleading. The -n
just saves it taking ages looking up
addresses.

David


Reply With Quote
  #4 (permalink)  
Old 11-25-2004
Robert Spangler
 
Posts: n/a
Default Re: I added a rule to iptables, how can I see existing rules?

On Wed, 24 Nov 2004 11:09:49 -0800, Santa wrote:

> I added a rule to iptables, how can I veridy my rule was added?. Also
> how can I see existing iptables rules?. Can I see some prints in
> /var/log/messages when rule gets executed?.


Well you could run the following command;

service iptables save

Then you could goto the following directory;

/etc/sysconfig

There you will find a file named 'iptables'. use the following command;

less iptables

You'll have to be 'su' to do all this.

> If anybody know more on iptables, could you write me two sentences
> about how it will work?. Appreciated.


Iptables takes the incoming packet and compares it to the rule list. When
a match is found it does what it is told to do with the packet i.e. DROP
ACCEPT FORWARD.



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:11 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0