SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 4.4 (protocol 1.99)
37/tcp open time?
113/tcp open ident OpenBSD identd
631/tcp open ipp CUPS 1.1
6000/tcp open X11 (access denied)
one thing that intrigues me is port 6000. I use X (KDE) when I'm using my slackware but I don't use my slackware as an X server for other user.
my questions are:
why it's open?
Whilst in my co-workers' slackware 11.0 there's NO port 6000 open...
(yes, they're using X just for their own computer also).
How to close it?
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Not meaning to split hairs here but I would tend to alias the "startx" script to "startx -- -nolisten tcp" for several reasons. 1) You are not altering a standard script which may be overwritten when updgrading/reinstalling something. 2) The original functionality if the script is preserved. 3) Different functionality may given to some users by having their own environment (i.e. some users have the alias, others don't. 4) It can become difficult to keep track of "customizations" to the original Slackware settings, keeping them (as aliases) in /etc/profile.d or ~/.bashrc keeps system wide/local settings in two easily maintainable places. This is much like a lot of the rc.d scripts source .conf files so the original script may be left intact. Others may disagree - there's more than one way to skin a cat !! Just a few ideas anyway..
Yea, good point with the alias bgeddy. I'm the only user on my computer and I'll never need or want that port open so that's how I choose to handle it. An alias would be more "proper". Especially if this were at work, like I think the OP is suggesting. To the OP, I'm fairly certain that the global and local bashrc file won't get read on login shells and I don't know if you can define an alias in the global or local profile files. A ~/.bash_profile sourcing ~/.bashrc which in turn contains:
alias startx='startx -- -nolisten tcp'
aught to work. Someone correct me if I'm mistaken. Defining said alias in /etc/bashrc would defeat the purpose of keeping it user based....
@pdw_hu, Judging from your short and slightly unhelpful post, I'm assuming you mean to block traffic on that port via a firewall script?
iptables -A INPUT -p ALL -i $INTERFACE --dport 6000 -j DROP
Not too much point in doing that. 1.) Last I checked, Slackware doesn't come with a firewall script so you'd have to spend some time setting one up. 2.) Why even have the port listen at all if your not going to use it?
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Oops - sorry about possibly misleading you with the ~/.bashrc. I have my ~/bash_profile set up to source the ~/.bash_rc if it exists and store all my aliases in the ~/.bashrc. (I was forgetting that my ~/.bash_profile was set to source the ~/.bashrc on my setup. So much to my extolling the virtues of standard Slackware setups !). However at least you spotted it !
So - in a nutshell : as you said..
Code:
A ~/.bash_profile sourcing ~/.bashrc which in turn contains:
alias startx='startx -- -nolisten tcp'
aught to work. Someone correct me if I'm mistaken. Defining said alias in /etc/bashrc would defeat the purpose of keeping it user based....
and yes, anything in /etc defeats the object of being user based. Phew - I think we got there in the end...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.