From: Abdul-Wahid Paterson <abdulwahid@gmail.com>
To: Khoa Nguyen <knguyen@megisto.com>,
Netfilter List <netfilter@lists.netfilter.org>
Subject: Re: How to log redirected packets
Date: Thu, 9 Sep 2004 13:04:26 +0100 [thread overview]
Message-ID: <995fcdb004090905044dfe3bf8@mail.gmail.com> (raw)
In-Reply-To: <AD3C7008DB448D42ABA9346FE715E8340D335D@megisto-e2k.megisto.com>
You need to add in the same matches as your redirect statements...So
one for each with the first one being:
iptables -t nat -A INSERT 1 -p tcp --dport 80 -j LOG --log-level debug
I have put this as an INSERT as it has to go above the redirect line.
Following this example you can make a LOG line for each of your
redirects.
Abdul-Wahid
On Wed, 8 Sep 2004 18:42:47 -0400, Khoa Nguyen <knguyen@megisto.com> wrote:
> Hi,
>
> I have the following in the nat table:
>
> [root@jungle log]# iptables -t nat -L -v
> Chain PREROUTING (policy ACCEPT 6 packets, 547 bytes)
> pkts bytes target prot opt in out source
> destination
> 2 120 REDIRECT tcp -- any any anywhere
> anywhere tcp dpt:http redir ports 8081
> 0 0 REDIRECT tcp -- any any anywhere
> 172.16.6.5 tcp dpt:rtsp redir ports 8081
> 0 0 REDIRECT tcp -- any any 172.16.6.5
> anywhere tcp spt:rtsp redir ports 8081
> 0 0 REDIRECT tcp -- any any anywhere
> 172.16.6.6 tcp dpt:rtsp redir ports 8081
> 0 0 REDIRECT tcp -- any any 172.16.6.6
> anywhere tcp spt:rtsp redir ports 8081
>
> Now I would like to log all redirected packets to a file. How do I do
> that? I did try the following but it didn't work:
>
> iptables -t nat -A PREROUTING -j LOG --log-level debug
>
> It only logged message destined to its local interface.
>
> Thanks,
>
> Khoa Nguyen
>
>
next prev parent reply other threads:[~2004-09-09 12:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-08 22:42 How to log redirected packets Khoa Nguyen
2004-09-09 12:04 ` Abdul-Wahid Paterson [this message]
2004-09-09 16:41 ` Jose Maria Lopez
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=995fcdb004090905044dfe3bf8@mail.gmail.com \
--to=abdulwahid@gmail.com \
--cc=knguyen@megisto.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.