Stop X11 from listening for network connections
It seems to listen on port 6000.
I could just block port 6000 but new connections can be set up on higher random allocated ports. I want to stop X11 showng as listening when scanned and prevent connections to the service and still be able to use X-windows on the localhost.
Add this to your /usr/X11R6/bin/startx:
You can also change into the directory "/etc/X11/xdm" which contains a file called "Xservers" in this there is a line:
":0 local /usr/X11R6/bin/X"
Probably just change it to:
":0 local /usr/X11R6/bin/X -nolisten tcp"
Will do the trick..
Last updated: 13/02/2005