Re: X and masquerading

Jesse Pollard (pollard@tomcat.admin.navo.hpc.mil)
Thu, 30 Dec 1999 09:52:01 -0600 (CST)


Victor STANESCU <bruno@Heineken.lmn.pub.ro>:
>Is there any posibility to forward a connection from an external (real
>world ip) X client through a masquerading linux box to a
>intranet(192.168.x.y) X server?

No/yes

1. No: Given the following:

X server --->NAT---->remote host -- X app

Then a straight X application running on the remote host cannot establish
a session with the X server. That would require some type of relay on the
NAT host - which then depends on the relay to be able to establish
links from (potentially) multiple servers(hosts) behind the NAT to multiple
remote hosts. Not likely or desirable.

2. yes: Given the following:

X server -- ssh client ---->NAT--->remote host -- sshd server -- X app

and that the sshd server permits X forwarding.

Secure shell can/does establish a TCP link to a remote sshd server.
If the sshd server is configured to allow X forwarding, then the
sshd server will establish a tunnel from the sshd server back to the
ssh client, which then passes it to the X server. The sshd server
creates a pseudo X server, along with X authentication keys, and allows
the X app to connect to the pseudo X server. This provides an encrypted
communication path from ssh client to sshd server for all X traffic.
In some cases the transfer can be faster since the encryption also does
a compression on the data passed.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/