LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how closed 6000/tcp - X in MDK 9.1 (https://www.linuxquestions.org/questions/linux-networking-3/how-closed-6000-tcp-x-in-mdk-9-1-a-140718/)

WannaLearnLinux 01-31-2004 11:21 AM

how closed 6000/tcp - X in MDK 9.1
 
Pls can any1 help me how to block X server in MDK 9.1,using Guarddog firewall?

I was searching here and Googled but can't find it. :(

WannaLearnLinux 01-31-2004 11:25 AM

forgot
 
I'm using Lilo with text login. Init : runlevel 3.

frogman 01-31-2004 05:46 PM

Assuming you use "startx" to get a gui, you can prevent X listening by editing startx. su to root then, using vi or your favourite editor, open /usr/X11R6/bin/startx

there's a line that says:

Code:

serverargs=""
(or similar - not on linux box at the moment)

change it to read
Code:

serverargs="-nolisten tcp"
You'll need to restart the x-server for it to stop listening (it'll happen next time you reboot if you don't want to faff about).

When you say X is listening, I assume you mean it's listening on the loopback (127.0.0.1 / localhost) rather than your actual network address?

i.e compare: nmap localhost with nmap <my_ip_address>

WannaLearnLinux 01-31-2004 11:41 PM

hi
 
Thanx for reply.
Its X server is on some 0.0.0.0,not the 127.... here is netstat -nlp :

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN -
udp 0 0 0.0.0.0:68 0.0.0.0:* -


I'm working on this port 68 too.But now mostly X.

Should I then stop it or not.Even when it is not 127.0.0.0?What means those zeros?

thanx

Sorry just

:newbie:

WannaLearnLinux 02-01-2004 12:19 AM

and netstat -nlp as root
 
# netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 1758/

What means 1758?

Thanx.

Yea Just blocked port 68/udp - DHCP thanx to some threat here
:)

WannaLearnLinux 02-03-2004 11:14 PM

Hi frogman
 
Quote:

Originally posted by frogman
Assuming you use "startx" to get a gui, you can prevent X listening by editing startx. su to root then, using vi or your favourite editor, open /usr/X11R6/bin/startx

there's a line that says:

Code:

serverargs=""
(or similar - not on linux box at the moment)

change it to read
Code:

serverargs="-nolisten tcp"
You'll need to restart the x-server for it to stop listening (it'll happen next time you reboot if you don't want to faff about).

When you say X is listening, I assume you mean it's listening on the loopback (127.0.0.1 / localhost) rather than your actual network address?

i.e compare: nmap localhost with nmap <my_ip_address>

I added with vi as root -nolisten tcp and rebooted,but netstat -nlp as root shows its 6000/tcp listenning at 0.0.0.0

Am I too paranoid about that?


All times are GMT -5. The time now is 01:35 PM.