Unable to TCP into X - lightdm configured properly

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Post Reply
bmcatt
Baby Hen
Posts: 4
Joined: Thu Mar 01, 2018 18:10

Unable to TCP into X - lightdm configured properly

Post by bmcatt » Thu Mar 01, 2018 18:22

As the title says, as far as I can tell, I have everything configured properly, but external connections to port 6000 are failing.

lightdm.conf:

Code: Select all

[Seat:*]
xserver-allow-tcp=true

Code: Select all

$ ps ax | grep 'listen tcp'
 2400 tty7     Ssl+   8:11 /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -listen tcp vt7 -novtswitch
And, indeed, it shows as being open:

Code: Select all

$ netstat -an | grep 6000
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN
If I (locally) set DISPLAY to 127.0.0.1:0 or 192.168.0.45:0 (the local IP), connections are fine. However, from any external host, and it fails:

Code: Select all

$ nc -v 192.168.0.45 6000
nc: connectx to 192.168.0.45 port 6000 (tcp) failed: Connection refused
(Pardon that it's from a Mac. KVM switch makes that part easy...)

Note that inbound ssh connections work fine, this seems to be limited to just X (port 6000).

Not sure what to look at next to fix this.

Thoughts / input, please?

bmcatt
Baby Hen
Posts: 4
Joined: Thu Mar 01, 2018 18:10

Re: Unable to TCP into X - lightdm configured properly

Post by bmcatt » Wed Mar 07, 2018 17:39

A-ha! Apparently, iptables was to blame here.

No matter what else was modified, it also needed

Code: Select all

# iptables -F
to make it work.

Post Reply