SV: Port forwarding

Jari.Marikainen at vlt.se Jari.Marikainen at vlt.se
Fri Jan 21 08:30:18 UTC 2005


Hi,
I really want the traffic from the target (65.114.4.69) server to reply directly to the client. We don't need/want any traffic back. Is your suggestion still valid, or do I need to do modifications to the lines below?
I really appreciate your help Andy and others. Couldn't fix this on our own.

Best regards
/jari 

-----Ursprungligt meddelande-----
Från: Andy [mailto:ag1234 at carmen.se] 
Skickat: den 18 januari 2005 17:14
Till: fedora-list at redhat.com
Ämne: Re: Port forwarding

Hi,

Jari Marikainen wrote:
> I would like to forward incoming traffic from internet to 
> "<195.198.111.x> port 80" to "<some other ip on the internet> port 80"
> in FC3 on the same interface.

I would try the DNAT/SNAT iptables targets, along the lines of:
iptables -t nat -A PREROUTING -p tcp --dport 80 -d 195.198.111.x \
	-j DNAT --to-destination 65.114.4.69
iptables -t nat -A POSTROUTING -p tcp --dport 80 -d 65.114.4.69 \
	-j SNAT --to-source <your external IP address on this machine>

The second line makes the real server send it's replies through the same path (otherwise it will reply directly to the client)

You have to enable/allow forwarding for everything to work.

hth,
/Andy

--
fedora-list mailing list
fedora-list at redhat.com
To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list




More information about the fedora-list mailing list