Re: port redirect for localy generated request

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

 



> With this rule incoming request for port 80 redirected to port 8080. But
> this is not working localy generated request.
> iptables -t nat -A PREROUTING -p tcp --dport 80 -d LISTEN_IP -j DNAT --to
> LISTEN_IP:80

You have to use the OUTPUT Chain for localy generated packets:

iptables -t nat -A OUTPUT -p tcp --dport -d $LISTEN_IP -j DNAT --to 
$LISTEN_IP:8080


Greetings,
Thorsten Scherf
RHCE, RHCX


[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