LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-02-2005, 03:45 PM   #1
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
setting-up an xserver connection with remote host through local firewall.


Hello,

I'm wondering if someone could help me with an issue i'm having.
I can log in to an remote host via ssh. I want to run an program on this host that requires an xserver to run. I would this program to use the xserver that's running on my localhost.
So I did the following: I set the 'DISPLAY' enviroment variable on the remote host to the ipadress of the localhost;
Code:
export DISPLAY=aa.bb.cc.dd:0.0
. After that I ran 'xhost' on my local machine:
Code:
xhost + ww.xx.yy.zz
where 'ww.xx.yy.zz' is the IP adress of the remote host.
But after this, I still can't display stuff on my local machine because the firewall is blocking the connection. I tried turing the firewall of, and after that I can display the program on my local machine. But needless to say that is not exactly an elegant and desirable solution.
So how do I set things up so that I can get an connection through the firewall? I read something about the 'xfwp' program on the net, but after reading the man page of this program, it's apperent that I really need help from someone to set things up.

Peace dudes.....

Your eternal

Last edited by qanopus; 05-02-2005 at 03:49 PM.
 
Old 05-03-2005, 03:25 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
It depends...Do you want to run separate programs or the whole X session on another machine?
 
Old 05-03-2005, 04:20 PM   #3
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Original Poster
Rep: Reputation: 45
Hi,

Just one program...
 
Old 05-03-2005, 04:57 PM   #4
jerky
Member
 
Registered: Jul 2003
Distribution: RH 7.3 , RH9,RHEL,FC
Posts: 38

Rep: Reputation: 15
xserver

First of all your Xserver depending on its distribution comes shipped with some sort of command line switches when it loads, as of FC3 the Xserver port is closed by default in GDM configuration with the --nolisten switch, your xserver is by default not running a LISTEN port on your local machine..

you can check to see your X command line switch by running
ps aux | grep X

something like this is rendered in FC3 by default
"/usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7"

if this is the case you must first edit your
/etc/X11/gdm/gdm.conf"

to comment out the "nolisten" directive.. then Restart X if this is the case

Second verify that it is now listening , default is port 6000
netstat -an | grep X
nmap localhost

if either renders you port 6000 LISTEN / OPEN your now ready to recieve connections, you must then allow your firewall to allow connections to port 6000 tcp

iptables -A INPUT -m tcp -p tcp --dport 6000 -m state --state NEW -s ALLOWEDIPADDRESS -j ACCEPT
 
Old 05-04-2005, 04:40 AM   #5
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Original Poster
Rep: Reputation: 45
Dude, thanks very much! it worked!!!!
 
Old 02-02-2006, 10:11 AM   #6
gregmdusa
LQ Newbie
 
Registered: Feb 2006
Posts: 1

Rep: Reputation: 0
I guess FC4 is a little different. I had to to the following.

I had to edit /etc/X11/gdm/gdm.conf and do the following.

Uncomment this line.
#DisallowTCP=true

Expressly set the parameter to false.
DisallowTCP=false.


At that point you can either reboot or restart X11 processes.

Thanks again!
 
  


Reply


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
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 35 10-23-2017 12:21 AM
Forwarding local traffic to remote host: kernel development sl_king Programming 1 08-25-2005 06:53 PM
Remote connection UNKNOWN host scoban Linux - Networking 2 07-14-2005 10:09 AM
rndc: connection to remote host closed. james.farrow Fedora 2 06-16-2004 11:40 AM
remote host connection script question??? gopi_20us Programming 4 03-01-2002 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration