Opening TCP/UDP ports

Archived topics about LMDE 1 and LMDE 2
Locked
crunchytheory

Opening TCP/UDP ports

Post by crunchytheory »

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/Tr ... play.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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29459
Joined: Wed Jul 06, 2011 3:58 am

Re: Opening TCP/UDP ports

Post by xenopeek »

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

Return to “LMDE Archive”