LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-07-2010, 10:51 PM   #1
unraisedarc
LQ Newbie
 
Registered: Jun 2010
Posts: 19

Rep: Reputation: 0
How to close listening port in Ubuntu 10.04


I know that ports are, by default, not filtered; they simply don't respond to requests if there are no services listening on the port. Well, running netstat -tulpn gives:
Code:
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:7654            0.0.0.0:*               LISTEN      2106/transmission
tcp6       0      0 :::22                   :::*                    LISTEN      -               
tcp6       0      0 ::1:631                 :::*                    LISTEN      -               
tcp6       0      0 :::7654                 :::*                    LISTEN      2106/transmission
udp        0      0 0.0.0.0:57366           0.0.0.0:*                           -               
udp        0      0 0.0.0.0:68              0.0.0.0:*                           -               
udp        0      0 0.0.0.0:7654            0.0.0.0:*                           2106/transmission
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           -
And running sudo lsof -i tcp:631 gives

Code:
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
cupsd   1156 root    6u  IPv6   5081      0t0  TCP localhost:ipp (LISTEN)
cupsd   1156 root    7u  IPv4   5082      0t0  TCP pc002-laptop:ipp (LISTEN)
I want to end the services that are listening on port 631, but I'm not sure how to do that. Some sources say xinit.conf, others say init.conf, and others say /etc/services, but I don't really know what to do so that this cupsd doesn't start automatically. I do not run a printing server on this box.

Thanks!

Last edited by unraisedarc; 07-07-2010 at 10:57 PM.
 
Old 07-07-2010, 11:00 PM   #2
unraisedarc
LQ Newbie
 
Registered: Jun 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Ok, just realized I could simply kill the PID of the service to end it.

Code:
ps aux | grep cupsd
Code:
kill -9 <PID>
I just need to know how to preven cupsd from running on startup.
 
Old 07-07-2010, 11:17 PM   #3
mryuck
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 23
localhost:631 is the cups web browser admin interface.
If you have no printer you could just uninstall cups.
 
Old 07-07-2010, 11:24 PM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

Rep: Reputation: 102Reputation: 102
Lightbulb

Stop Cups service for that session
Code:
service cupsd stop
Stop it permanently, so you dont have it even after a reboot.
Code:
chkconfig cupsd off
 
  


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
Port listening adnanm Linux - Newbie 1 03-17-2009 05:32 PM
how to close port 1050 please help how to close it. mr norm Linux - General 1 09-12-2008 08:57 AM
Port not listening shadetree Linux - Networking 2 08-27-2008 04:07 PM
Howto do Secured ssh from port https or port80(standard) to ssh d listening port 22 ? Xeratul Linux - General 4 11-23-2006 07:09 AM
listening on port 80, why ekdya Debian 5 09-27-2006 07:50 PM


All times are GMT -5. The time now is 10:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration