Forum OpenACS Q&A: Using X from behind a NAT router
We have a T1 here in the office, so my computer is on an internal LAN behind a NAT router. I have a dynamically assigned IP address.
I've just installed XDarwin (*yea*) and want to be able to run Tora on one of our servers and route the display back here. Unfortunately, I can't figure out how to do it.
I know the name and IP address the router presents to the outside world, but that doesn't give enough information to route traffic through to my computer. I've tried a few variations of router name + my system name, but nothing has worked.
via the ssh connection and the tunnelling will be handled for you (and ssh will even set the DISPLAY variable for you).
I could not tell you all the things to set though.
I am unsure of what kind of router you use. But I was able to use Cisco IOS, ipchains + port forward or iptables. What I did was to have the router listen to 6000 then foward this to my PC on the internal network. Then on the remote server tell that your X server is the router.
Or better yet use SSH tunneling. See -L or -R options. Or just edit the sshd config of the remote server to allow X11 forwarding.
Jeff is correct. I use ssh forwarded X all the time (although it will remind you of dial up speeds.)
Make sure you have in your sshd xforwarding set to on and also the one about terminals ( I forgot the name).
I believe that the default is not to forward X. Also, make sure your router forwards the ports correctly (I don't remember the numbers (although they are easy to find).
For the record, here's what I did:
- On the local system, create/edit $HOME/.ssh/config and add "ForwardX11 yes"
- From the X desktop, ssh to the remote server
- Run the X application on the remote server from the ssh instance