Re: iptables port80 forward and snat

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

 



On Fri, 13 Jan 2006 21:12:18 +0200, J.P. Fischer wrote:

> I have a RH ES4 box with 3 eth.ports and safesquid
installed.
> Safesquid listens on port 8080.
> Eth0 = 1.1.1.1  (Internet connection)
> Eth1 =  2.2.2.2
> Eth2 = 192.168.1.1 (needs to be sNATted)
>
> How do I setup iptables to:
>
> 1- Snat traffic coming in on eth2

iptables -t nat -A POSTROUTING -i eth2 -o eth0 -j SNAT
--to-source 1.1.1.1

> 2- port forward http traffic coming in on eth1 to port
8080 (so it will hit
> the safesquid running on the box)

here:
http://iptables-tutorial.frozentux.net/iptables-tutorial.html#REDIRECTTARGET
it says it should look something like this:

iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j
REDIRECT --to-ports 8080

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


[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