RE: Masquerading on local ports

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

 



> And here is the question. How is it possible to nat a lokal port?
> 
> IPTABLES -t nat -A PREROUTING -p tcp -d 127.0.0.1 
> --destination-port 81 -j DNAT --to-destination 127.0.0.1:80
> 
> telnet localhost 80  <<< works
> telnet localhost 81  <<< Connection refused

iptables -t nat -A PREROUTING -d 127.0.0.1 -p tcp --dport 80 -j REDIRECT
--to-ports 81


Rob



[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