[Gllug] port forwarding
Peter Joanes
pjoanes at hotmail.com
Fri Jun 24 11:10:04 UTC 2005
On Friday 24 June 2005 11:32, t.clarke wrote:
> I assume SNAT rewrites the source IP address of the packets being passed to
> the webserver and then rewrites the original source address back into the
> destination address of the reply packets received in due course?
>
> Does this involve another a rule or simply an extra paramter on one of the
> existing rules?
You'd need to add something like this:
iptables -t nat -A POSTROUTING -o eth1 -p tcp -d 192.168.n.n \
-j SNAT --to 192.168.m.m
Where 192.168.m.m is the address assigned locally to the interface of the
debian box that connects it to the webserver.
This is a bit of a temporary measure usually, because it will make all the web
requests appear to have come from your debian machine.
- Pete.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list