LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 09: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 09:57 PM.
 
Old 07-07-2010, 10: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, 10: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, 10:24 PM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
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



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 04:32 PM
how to close port 1050 please help how to close it. mr norm Linux - General 1 09-12-2008 07:57 AM
Port not listening shadetree Linux - Networking 2 08-27-2008 03: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 06:09 AM
listening on port 80, why ekdya Debian 5 09-27-2006 06:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:26 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