Opening TCP/UDP ports

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

Opening TCP/UDP ports

Postby crunchytheory on Mon Jul 02, 2012 8:21 pm

I'm trying to open a pair of ports (TCP 6000 and UDP 177) so that I can open an xterm window on my local machine from a remote headless server. I got these port numbers from here: http://www.softpanorama.org/Xwindows/Troubleshooting/can_not_open_display.shtml

I have the ufw firewall enabled with added rules like so:

$ sudo ufw status
Status: active

To Action From
-- ------ ----
6000/tcp ALLOW Anywhere
177/udp ALLOW Anywhere
6000/tcp ALLOW Anywhere (v6)
177/udp ALLOW Anywhere (v6)

However, scanning the ports of this local machine from a different machine (using nmap) shows only one port and it's closed:

Interesting ports on <local machine>:
Not shown: 1679 filtered ports
PORT STATE SERVICE
6000/tcp closed X11

Why don't these rules seem to be working? And even disabling ufw completely seems to do nothing - telnetting to either of these ports ends up with a connection refused message.
crunchytheory
Level 1
Level 1
 
Posts: 3
Joined: Thu Sep 08, 2011 3:14 pm

Linux Mint is funded by ads and donations.
 

Re: Opening TCP/UDP ports

Postby xenopeek on Tue Jul 03, 2012 9:24 am

Don't you also need to run
Code: Select all
xhost +

to allow other X clients to connect to your X server? By default access control is enabled, and only authorized clients can connect. Using "xhost +" you disable access control. See the manpage, you may want to change this to xhost +hostname instead.

If you have the remote headless server outside your local network, you also need to configure NAT/firewall of your Internet router to forward Internet traffic on those ports to your system.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15452
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 0 guests