Close mysql and cups ports and jet port

Asked by kaphar

On installation of MySQL we find it leaves an open port, even when server is not running. Port is also always open for cups. While these may not pose an immediate threat we would like to close them.. How do we do this ? Would like to know method, utility or element in Ubuntu to do this. We are using 10.10. The connection is normally down to act as some protection. Thanks
Kapt

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-nettool Edit question
Assignee:
No assignee Edit question
Solved by:
kaphar
Solved:
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

Try shutting down the service
e.g.
sudo /etc/init.d/cups stop
sudo /etc/init.d/mysql stop

Note that on restart, these will come back up.

Revision history for this message
kaphar (captain-harry) said :
#2

using the stop command on the cups port works. The format has changed a
bit now but it still works.
The same stop command for mysql does not work.
3306/tcp open mysql MySQL 5.1.49-1ubuntu8.1

Nothing works for the 9103/tcp open (jetdirect?)

Any help would be appreciated. Tnx
KapHary

Revision history for this message
mycae (mycae) said :
#3
Revision history for this message
mycae (mycae) said :
#4

Oh, you can also use the tool "netstat" to work out what programs are using which ports, as in

sudo netstat -nlp | egrep '(tcp|udp)'

then you can identify (and possibly kill) the process

Revision history for this message
kaphar (captain-harry) said :
#5

Thanks to all for the information. I have tried he advice and most of it works to some degree. Since I really don't know how it got this problem, and I have not significant data in the db I am going to dump the whole thing, clean it up and reinstall it. Thanks to all.
KapHar