View Single Post
  #1  
Old 17th August 2011, 21:42
jariasca jariasca is offline
Member
 
Join Date: Jan 2010
Posts: 43
Thanks: 2
Thanked 8 Times in 4 Posts
Default NAT Log Iptables

Hi, All

I have a NAT and I neet to LOG the traffic, is there a way that I can do it
I have try with no luck only by using tcpdump.

this is the NAT

iptables -t nat -A POSTROUTING -s 10.41.15.0/28 -o eth0 -j SNAT --to 200.105.101.241
iptables -t nat -A POSTROUTING -s 10.41.15.16/28 -o eth0 -j SNAT --to 200.105.101.242
iptables -t nat -A POSTROUTING -s 10.41.15.32/28 -o eth0 -j SNAT --to 200.105.101.243
iptables -t nat -A POSTROUTING -s 10.41.15.48/28 -o eth0 -j SNAT --to 200.105.101.244
iptables -t nat -A POSTROUTING -s 10.41.15.64/28 -o eth0 -j SNAT --to 200.105.101.245
iptables -t nat -A POSTROUTING -s 10.41.15.80/28 -o eth0 -j SNAT --to 200.105.101.246
iptables -t nat -A POSTROUTING -s 10.41.15.96/28 -o eth0 -j SNAT --to 200.105.101.247
iptables -t nat -A POSTROUTING -s 10.41.15.112/28 -o eth0 -j SNAT --to 200.105.101.248
iptables -t nat -A POSTROUTING -s 10.41.15.128/28 -o eth0 -j SNAT --to 200.105.101.249
iptables -t nat -A POSTROUTING -s 10.41.15.144/28 -o eth0 -j SNAT --to 200.105.101.250
iptables -t nat -A POSTROUTING -s 10.41.15.160/28 -o eth0 -j SNAT --to 200.105.101.251
iptables -t nat -A POSTROUTING -s 10.41.15.176/28 -o eth0 -j SNAT --to 200.105.101.252
iptables -t nat -A POSTROUTING -s 10.41.15.192/28 -o eth0 -j SNAT --to 200.105.101.253
iptables -t nat -A POSTROUTING -s 10.41.15.208/28 -o eth0 -j SNAT --to 200.105.101.254


Thanks
Regards,

Jorge
Reply With Quote
Sponsored Links