LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-25-2007, 08:43 PM   #1
technopasta
Member
 
Registered: Apr 2004
Location: Australia
Distribution: Debian
Posts: 31

Rep: Reputation: 15
X11 forwarding + NAT


I have the following setup - sorry, this needs a bit of explanation because it's not entirely clear in my head yet.

IP/hostname
10.1.1.1/shu: hardware router
10.1.1.12/anubis: Ubuntu server, in DMZ - most ports forwarded from shu to it
horus/10.1.1.10, amunra/10.1.1.12, osiris/10.1.1.13: Ubuntu desktops, behind NAT

I have an SSH account on a remote box, which supports X11 forwarding.

How would I go about forwarding remote X11 --> osiris without changing any more port forwards?

Is there some way to go remote --> anubis --> osiris? I'd rather not install X11 on anubis but I will if needed.

Thanks in advance
 
Old 05-26-2007, 09:55 AM   #2
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Im my opinion, you should change your hardware router to bridge mode, then you could share the internet connection with your server and in this case you could tunnel your SSH connection to do what you want to do.

Just my opinion!

[]'s, FMC!
 
Old 05-26-2007, 05:54 PM   #3
technopasta
Member
 
Registered: Apr 2004
Location: Australia
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks for that, bridging might be a good idea but I suspect I'd lose the use of some of the router's features (integrated ATA for VOIP). My solution after some reading up was to:


ssh to anubis with X forwarding on
start an xterm from anubis
then within xterm
ssh to remote with X forwarding on


That works but is pretty ugly

Thanks again,
 
Old 05-26-2007, 07:18 PM   #4
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
There are some ways to tunel SSH connections, but I realy could not find it to tell you right now.

If I find a "clear" solution I'll let you know!

[]'s, FMC!
 
Old 05-26-2007, 07:58 PM   #5
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
ssh -Y -f hostsystem xterm

This will start a graphical shell on your client system, and you can then use that shell to invoke whatever graphical program you need.

Alternatively, you can enter:

ssh -Y -f hostsystem desiredgraphicalprogram

to start the graphical program directly.

For instance:

ssh -Y -f hostsystem Xsession

will start a complete X session on the client, like what you would have if you were sitting in front of the machine.

This will work so long as your router forwards the ssh port (port 22). If you can do a normal ssh login to the remote machine and it supports X forwarding, you can do this.

Last edited by jiml8; 05-26-2007 at 07:59 PM.
 
Old 05-26-2007, 08:44 PM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
One thing you could do is use a different port for ssh on osiris. This is similar to how VNC allows additional connections. It uses the next higher port for the second connection. In this case, you could have a different high number port for each machine.
 
Old 05-27-2007, 04:57 AM   #7
technopasta
Member
 
Registered: Apr 2004
Location: Australia
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks all. Jiml8's suggestion will be used immediately, but everyone who replied has given me stuff to do on my network!


Edit:
ssh -Y -f hostsystem xterm
doesn't work on my Macbook (osiris) until I enter
export DISPLAY=localhost:0, which I thought ssh -Y was meant to do.

Sorry if I forgot to tell you one of the clients was a Mac, but I remember that the same problem on other systems so I don't think it's specific.

Last edited by technopasta; 05-27-2007 at 05:02 AM.
 
Old 05-27-2007, 09:00 AM   #8
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Open graphical programs using X11 forward is realy slow over the internet, you could try Freenx, I use it every day and I realy love it.

Just a tip.

[]'s, FMC!
 
Old 05-27-2007, 05:52 PM   #9
technopasta
Member
 
Registered: Apr 2004
Location: Australia
Distribution: Debian
Posts: 31

Original Poster
Rep: Reputation: 15
FreeNX

FreeNX needs to be installed on client and server right?
Seeing as I'm only a user and not an administrator on the remote box, I don't think this would be possible.
 
Old 05-28-2007, 06:49 AM   #10
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Thats right, I tought that you were the adm from that machine!

[]´s, FMC!
 
  


Reply

Tags
forwarding, ssh, x11, xterm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X11 forwarding BigNate Linux - Software 16 06-21-2011 01:39 AM
X11 Forwarding BlueTornJacket Linux - Server 11 03-12-2007 05:00 PM
NAT forwarding kermitthefrog91 Linux - Networking 4 08-04-2005 03:26 AM
X11 forwarding paul_mat Linux - Newbie 3 12-12-2004 06:30 PM
X11 forwarding JanDeMan Mandriva 1 04-17-2004 09:02 PM


All times are GMT -5. The time now is 05:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration