natting specific ports

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

 



I want to "NAT" just specific ports to my Public IP.  Do the commands below
make sense?  I want my internal network to be able to telnet and send email.
(eth0 is my External NIC - it is exposed to the internet) 
iptables -t nat -A POSTROUTING -p tcp --sport 25 -o eth0 -s $INTERNAL_IP -j
SNAT --to $EXTERNAL_IP
iptables -t nat -A POSTROUTING -p tcp --sport 23 -o eth0 -s $INTERNAL_IP -j
SNAT --to $EXTERNAL_IP

Thank you,
Doug


[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