Re: Port forwarding and IPtables commands

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

 



Tammar K. Ajam wrote:

> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 \
>	-j REDIRECT -d 192.168.0.2/24 --to-port 3128

The REDIRECT target is valid only for the local machine. You have to use
the DNAT target, like Alexander Dalloz suggests, except that you dont't have to bother about udp: http is a tcp-only protocol.


There are a lot of other things to take care of: routes, name-resolving, allowing access with NAT from the squid machine to the internet and maybe something else that I can't think of now.

/Andy


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux