Opening TCP/UDP ports

Archived topics about LMDE 1
Forum rules
Level 1
Level 1
Posts: 3
Joined: Thu Sep 08, 2011 3:14 pm

Opening TCP/UDP ports

Postby crunchytheory » 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:

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
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.

User avatar
Level 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Opening TCP/UDP ports

Postby xenopeek » 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.

Return to “Archive”