Bluehost.com Web Hosting $6.95

X connection through router and firewall

This is a discussion on X connection through router and firewall within the Linux Networking forums, part of the Linux Forums category; Hello all, I am having problem in establishing an X connection with my work machine. Let me explain the situation ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-11-2004
Sourin
 
Posts: n/a
Default X connection through router and firewall

Hello all,
I am having problem in establishing an X connection with my work
machine. Let me explain the situation in some more detail. All
machines are running linux.

My computer at work is behind a firewall. So, when I need to connect
to it I have to ssh to hostA (firewall), which upon successful
authorization, it connects me directly to hostB on my office network.
If -X option is used with ssh, hostB tries to set its DISPLAY variable
to hostA's display, which fails.

At home I am using a DSL connection with a router. My home machine
gets a static IP from the router. I have set my router to forward port
22 to my machine and ssh connection to my home machine works fine. If
I do ssh -X from my home machine to hostC ( which is on some other
network and not behind any firewall ), I can open any X client on
hostC successfully. Also I can open a sshed X connection on hostB from
hostC after proper xauthorization ( hostB and hostC are on different
network).

I tried to forward the display port on hostB to my home machine port
6000 using ssh -R option, but X server on my home machine is refusing
that connection ( my router is also forwarding port 6000 ). I have
added hostB's xauth magic key to my home machine's xauth list.

Any suggestions.

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 06-12-2004
Cameron Kerr
 
Posts: n/a
Default Re: X connection through router and firewall

[Followups set to COLN]

In comp.os.linux.networking Sourin <sourin@lycos.com> wrote:

> My computer at work is behind a firewall. So, when I need to connect
> to it I have to ssh to hostA (firewall), which upon successful
> authorization, it connects me directly to hostB on my office network.


So you've told it to run ssh in your .bash_profile or similar? Icky.

> If -X option is used with ssh, hostB tries to set its DISPLAY variable
> to hostA's display, which fails.


The display variable should be untouched, and when displayed, it should
be like localhost:10. Make sure you are net setting DISPLAY anywhere in
your login scripts.

From your home machine, try doing the following. You might like to have
a look at my sshmh program, which you can find on my website.

ssh -CAXt user@hostA ssh -AXt user@hostB

This is most easily done if you have SSH keys set up.

--
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:13 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0