Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Leonardo Rodrigues Magalhães" <leolistas@solutti.com.br>
To: "John V. Kjellman" <johnk@victorex.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Comments at end of iptables statements
Date: Mon, 18 Jun 2007 09:14:49 -0300	[thread overview]
Message-ID: <46767739.4090306@solutti.com.br> (raw)
In-Reply-To: <4675658C.6010309@victorex.com>



John V. Kjellman escreveu:
> Any chance that a "#" or other character will one day be allowed as a 
> comment character at the end of iptables statements?
>

    You can use the comment module !! It allows you to easily grep 
'iptables -nL -v' output. I used it a LOT for creating IP Accounting 
rules which will be graphed by cacti.


iptables -A accounting_local_saida -p tcp --dport 80 -m comment 
--comment servidor_web
iptables -A accounting_local_saida -p tcp --sport 80 -m comment 
--comment servidor_web

iptables -A accounting_local_entrada -p tcp --dport 25 -m comment 
--comment entrada_emails
iptables -A accounting_local_saida -p tcp --sport 25 -m comment 
--comment entrada_emails


Chain accounting_local_entrada (1 references)
 pkts bytes target     prot opt in     out     source               
destination        
73718   85M            tcp  --  *      *       0.0.0.0/0            
0.0.0.0/0           tcp dpt:25 /* entrada_emails */
  231 50718            tcp  --  *      *       0.0.0.0/0            
0.0.0.0/0           tcp dpt:80 /* servidor_web */


Chain accounting_local_saida (1 references)
 pkts bytes target     prot opt in     out     source               
destination        
54932 2640K            tcp  --  *      *       0.0.0.0/0            
0.0.0.0/0           tcp spt:25 /* entrada_emails */
  202  113K            tcp  --  *      *       0.0.0.0/0            
0.0.0.0/0           tcp spt:80 /* servidor_web */

-- 


	Atenciosamente / Sincerily,
	Leonardo Rodrigues
	Solutti Tecnologia
	http://www.solutti.com.br

	Minha armadilha de SPAM, NÃO mandem email
	gertrudes@solutti.com.br
	My SPAMTRAP, do not email it






  parent reply	other threads:[~2007-06-18 12:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-17 16:47 Comments at end of iptables statements John V. Kjellman
2007-06-18 12:10 ` Gáspár Lajos
2007-06-18 12:14 ` Leonardo Rodrigues Magalhães [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-06-19 12:28 John V. Kjellman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46767739.4090306@solutti.com.br \
    --to=leolistas@solutti.com.br \
    --cc=johnk@victorex.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox