LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2003, 03:53 PM   #1
hegrunt
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Rep: Reputation: 0
Disable port 6000


Hello all,

I need some help. I am running RH9 and wish to disable port 6000 (X). I've read through a ton of newsgroups and websites and no joy. I've done just about everything I can and am begging for help!

I've gone and modified my:

/etc/X11/gdm/gdm.conf "StandardXServer=/usr/X11R6/bin/X"
section and added the option -nolisten tcp. I have tried killing X but it respawns.

...in addition, I have edited the /etc/X11/xdm/Xservers by adding the -nolisten tcp after X .

Really at a loss here. I wish to run X if I need to be on the console but would prefer not to advertise port 6000.

Other than disabling X, are there any options??

Thanks

HEM
 
Old 09-03-2003, 03:58 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Firewall off the port. Personanly I would deny all and allow a few - eg:
# Drop everything by default
iptables -P INPUT DROP
# Allow incomming ssh
iptables -A INPUT -p --dport 22 -j ACCEPT
# Allow incomming http
iptables -A INPUT -p --dport 80 -j ACCEPT
 
Old 09-04-2003, 11:05 PM   #3
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 49
After specifying the -nolisten param, you change your run level to 3 and then back to 5. It is only then that X stops listening on 6000.

And our new-mod David's suggestion to use iptables is ever-valid.
 
Old 09-05-2003, 01:18 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
The reason I tend to use iptables is that you can open it up to a specfic source address if you want to access the X server from another machine.
 
Old 09-08-2003, 01:49 PM   #5
hegrunt
LQ Newbie
 
Registered: Sep 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Disable port 6000

thanks for the help!

I went ahead and did a "init 3" and scanned the box and found the port 6000 disapeared and then port 111 took its place (interesting). Not sure why it did this for I'm not a super Linux guy but I went ahead and moved the /etc/rc3.d/S14portmap file (for when I reboot) and ran an /etc/init.d/portmap stop to stop the existing portmap service.

I am very greatful for Linux but there seems to be a ways to go on getting the word out on correctly configuring them. There are so many options that the RH Bible could never do it justice.

IMO though, there should be a simple config file that controls X.

thanks for your comments!

HEM
 
  


Reply


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 01:27 PM
help close port 6000 ronin4601 Linux - Newbie 6 04-23-2004 04:14 AM
port 6000 pottsie Linux - Security 6 04-23-2003 05:06 AM
port 6000, how to close it? neo77777 Linux - Security 2 05-16-2002 11:41 PM
Port 6000 sitrus Linux - Security 4 12-15-2001 04:25 AM


All times are GMT -5. The time now is 10:48 AM.

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