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

Re: Simple IP-Forwarding problem

Il 13 Jul 2005 alle 10:59 Marc Mueller immise in rete
> There are 3 servers (A,B,C), each running a ssh-daemon. None of them
> has a connection to the internet for security reasons - neither
> incoming nor outgoing.
> I'm aiming to setup IP-Forwarding on server X that I can connect
> from my local PC to the server A,B or C.
> 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.


yyyy is the port you connect from outside, to get 192.168.t.z

iptables -A PREROUTING -p tcp -m tcp --dport yyyy -j DNAT --to-
destination 192.168.t.z:22

remember that ssh client would complain that fot the same address 
there are 4 different keys . you could set on your remote host a hosdt 
file containing the names for the three remote server, such
a.b.c.d hiddenservera
a.b.c.d hiddenserverb
a.b.c.d hiddenserverc
where a.b.c.d is the address of the gateway.

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

Leonardo Boselli
Nucleo Informatico e Telematico del Dipartimento Ingegneria Civile
Universita` di Firenze , V. S. Marta 3 - I-50139 Firenze
tel +39 0554796431 cell +39 3488605348 fax +39 055495333

Reply to: