Take a look at NeonView - a minimalist and lightweight image viewer created by TuxArena!

Tip of the Day: Easily Close a Port in Linux

Posted by Craciun Dan | 1/19/2009 11:53:00 PM | | 0 comments »

You can easily see what are the ports in use with the command:

nmap localhost

Or:

nmap <YOUR_IP>

The output can be something like:

$ nmap localhost

Starting Nmap 4.62 ( http://nmap.org ) at 2009-01-19 23:45 EET
Interesting ports on localhost (127.0.0.1):
Not shown: 1711 closed ports
PORT STATE SERVICE
25/tcp open smtp
80/tcp open http
111/tcp open rpcbind
113/tcp open auth

Nmap done: 1 IP address (1 host up) scanned in 0.066 seconds

To close a port, you can use the following command as root:

fuser -k 80/tcp

Which will close port 80 (used by the web server).

0 comments

If you liked this article, please consider submitting it: