HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   NAT Log Iptables (http://www.howtoforge.com/forums/showthread.php?t=53817)

jariasca 17th August 2011 20:42

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


All times are GMT +2. The time now is 13:26.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.