RE: REDIRECT to localhost

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

 



> iptables -t nat -A PREROUTING -i "name of interface" -p tcp -m tcp --
> dport 80 -j REDIRECT --to-ports 3129
>
> If your default policy is to DROP all INPUT/FORWARD as is it should be.
>
>
> iptables -A INPUT -i "name of interface" -p tcp -m tcp --dport 80 -j
> ACCEPT

in this case--where you have ppp[0-9], you can also use the "+" notation to avoid having 10 rules that do the same thing; i.e., 

  iptables -t nat -A PREROUTING -i ppp+ -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3129

will match any ppp interface.

> You can also use -s "ip address" instead of -i  "name of interface".

or both...

-j



[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