How to log redirected packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux