Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-22-2004, 04:54 AM   #1
LQ Newbie
Registered: Apr 2004
Distribution: Mandrake 10 Fedora core 1
Posts: 14

Rep: Reputation: 0
help close port 6000

I am new to linux migrating from windows. I have managed to close all listening ports except port 6000. I could use some help with securing my computer. i have goggled allot of information but have not been able to find a solution please help. I am running mandrake 10
Old 04-22-2004, 05:31 AM   #2
LQ Newbie
Registered: Aug 2003
Location: Poland
Distribution: slackware r0x :>
Posts: 10

Rep: Reputation: 0
You can use iptables

iptables -A INPUT -p tcp --dport 6000 -j DROP

I'm afraid you will should to recompile your kernel to use iptables
or simply try to

modprobe ip_conntrack
modprobe ip_tables

hmm :>
Old 04-22-2004, 10:11 PM   #3
LQ Newbie
Registered: Apr 2004
Distribution: Mandrake 10 Fedora core 1
Posts: 14

Original Poster
Rep: Reputation: 0
isn't there a away to simply terminate the process that is opening the port or keeping it from loading up at boot I'm new the linux and recompiling the kernel is not something i want to try(not yet). kde process table list the command as /etc/X11/X. i use a cable modem and having a open port on as OS i know nothing about is asking for trouble after i iptables -A INPUT -p TCP -s 0/0 --destination-port 6000 -j DROP netstat still list the port as open thanks in advance

Last edited by ronin4601; 04-22-2004 at 11:14 PM.
Old 04-23-2004, 12:23 AM   #4
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
It should be used by X, if you use startx for your X session you can add "-nolisten tcp" to "defaultserverflags" in /usr/X11R6/bin/startx
If you use a DM you should be able to modify X server settings in the config file.

Last edited by Demonbane; 04-23-2004 at 12:38 AM.
Old 04-23-2004, 12:32 AM   #5
LQ Guru
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Port 6000 is X11 or X Window Server. If you stop X Window Server, you can not use any GUI programs. I do not think you are yet comfortable using command line. You will not hurt X Window Server if you block the port from incomming traffic.

Using something like IPTABLES is good to block ports. You can type "iptables -A INPUT -p tcp --dport 6000 -j DROP" or use a program like Firestarter to help you setup iptables. Firestarter is easy to setup. Firestarter just makes a script that loads a few files that you can edit. Everytime you boot up your computer, you can have it run the firestarter script.
Old 04-23-2004, 01:34 AM   #6
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
Under Mandrake you can use drakconf (System->Configuration->Configure your computer) to configure X not to listen to port 6000. Once you start up drakconf the setting you need to change is under Security->Level and checks in the Systems Options tab. The two settings of use there are "Allow X Window connections" and "Authorize TCP connections to X Window". Change them to "NONE" and "no" respectively.

The part above that stops the X server from listening to tcp port 6000 changes /etc/X11/xdm/Xservers. You could do the same yourself by editing /etc/X11/xdm/Xservers and changing to add "-nolisten tcp" to each configured display so the end would look something like:

:0 local /usr/X11R6/bin/X -deferglyphs 16 -nolisten tcp
:1 local reserve /usr/X11R6/bin/X :1 vt8 -deferglyphs 16 -nolisten tcp
:2 local reserve /usr/X11R6/bin/X :2 vt9 -deferglyphs 16 -nolisten tcp
:3 local reserve /usr/X11R6/bin/X :3 vt10 -deferglyphs 16 -nolisten tcp
:4 local reserve /usr/X11R6/bin/X :4 vt11 -deferglyphs 16 -nolisten tcp
:5 local reserve /usr/X11R6/bin/X :5 vt12 -deferglyphs 16 -nolisten tcp

Next time you start X it won't be listening to the tcp port.
Old 04-23-2004, 03:14 AM   #7
LQ Newbie
Registered: Apr 2004
Distribution: Mandrake 10 Fedora core 1
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks to all of you! It was browsing through this form that helped me to make my final decision about trying linux. I was honestly shocked to find so many people willing to help out us newbies. I cant say thanks enough


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close port 6000? WilliamS Slackware 12 03-02-2005 12:27 PM
port 6000 pottsie Linux - Security 6 04-23-2003 04:06 AM
close port 6000/tcp 515/tcp SchwipSchwap Linux - Newbie 1 09-12-2002 08:24 AM
port 6000, how to close it? neo77777 Linux - Security 2 05-16-2002 10:41 PM
Port 6000 sitrus Linux - Security 4 12-15-2001 03:25 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration