LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 02: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, 02:58 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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, 10:05 PM   #3
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
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, 12:18 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
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, 12: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



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
help close port 6000 ronin4601 Linux - Newbie 6 04-23-2004 03:14 AM
port 6000 pottsie Linux - Security 6 04-23-2003 04:06 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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
Open Source Consulting | Domain Registration