Search This Blog

Wednesday, July 13, 2005

Re: Simple IP-Forwarding problem

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marc Mueller wrote:
> Hi guys,
>

<snip>

>
>
> Is there any way to do that with iptables?
> The only thing I have found is portforwarding on the local machine,
> but I can not figure out how to forward connections to another machine.
>

something like:

iptables -t nat -A PREROUTING -p tcp -i eth0 -d xx.xx.xx.xx --dport
60001 -j DNAT --to 192.168.xx.xx:22
iptables -A FORWARD -p tcp -i eth0 -d 192.168.xx.xx --dport 22 -j ACCEPT

should do it.

HTH

Dave
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC1ODC62r58u1gKlkRAro4AKCJCMClFmv6SGHtbThy7Mi3zJQGUwCaAmrV
iPt2xtgMY+E/a4uuW8uCvlo=
=tOuO
-----END PGP SIGNATURE-----

--
To UNSUBSCRIBE, email to debian-firewall-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

No comments: