Ubuntu off 631 (cups) port

Source: Internet
Author: User

In the ubuntu17.04 environment, using NMAP to scan their own machine, found that 631 port is open, the input into the browser, you can see that the network printer services:

This port is always so dazzling, (5.12 Global outbreak of ransomware virus makes people shudder, the virus takes advantage of the Windows system's 445 port for infection), for security, usually during the learning process, and will not use to the network printer, so decided to close the port.

There is a cups.conf in the script under the/etc/init file that is used at boot, and you can see that there are three lines in it as follows:

1 start On (filesystem2           and (started Dbus or runlevel [2345]))3 stop on RunLevel [016]

We can see what he means when the runlevel is 2345, the service is turned on, and we can check the runlevel of our current environment by runlevel this command.

Here we want the service to be closed under whatever runlevel, and change the above three lines to the following:

1 start On (filesystem2and          (started Dbus or RunLevel []))3 stop on RunLevel [0 123456]

Reboot to see if this service is closed, port is not also open!!!

Ubuntu off 631 (cups) port

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.