LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   how to close port which is not necessary? (https://www.linuxquestions.org/questions/linux-security-4/how-to-close-port-which-is-not-necessary-936888/)

Antares.Liu 03-28-2012 09:41 AM

how to close port which is not necessary?
 
I have found some opened port with nmap, I have closed the tcp port 25 and 111 by stop the sendmail and rpcbind service. the problem now is how to close the 631 port , the port was detected as ipp (internet printint protocol) by nmap .

jlinkels 03-28-2012 10:09 AM

631 is the CUPS server.

Either you can disable/uninstall CUPS, but you also disable printing.

Or you can HTTP to localhost:631 and configure CUPS such that it doesn't allow connections from localhost.

Or you can install iptables and deny all connections as a policy and then open only the ports you need specifying which hosts are allowed to connect etc.

jlinkels

Antares.Liu 03-28-2012 06:24 PM

Quote:

Originally Posted by jlinkels (Post 4638810)
631 is the CUPS server.

Either you can disable/uninstall CUPS, but you also disable printing.

Or you can HTTP to localhost:631 and configure CUPS such that it doesn't allow connections from localhost.

Or you can install iptables and deny all connections as a policy and then open only the ports you need specifying which hosts are allowed to connect etc.

jlinkels

Thanks for your hints, can you tell me how to stop the server, because I find all the services(rpcbind service and sendmail service) I had stopped still running when my laptop reboot.

chrism01 03-28-2012 08:12 PM

Try chkconfig http://linux.die.net/man/8/chkconfig

Antares.Liu 03-28-2012 11:27 PM

thanks chrism's help


All times are GMT -5. The time now is 02:34 AM.