SuSE Linux operating system security reinforcement (Service shutdown)
After installing the SuSE Linux operating system, you need to perform a security scan to disable unused ports to enhance the security of the operating system.
1. the system starts the service by default:
Shelly:/etc/init. d # NMAP-P0 127.0.0.1
Starting NMAP 4.00 ([url] http://www.insecure.org/nmap/#/url]) at CST
Interesting ports on localhost (127.0.0.1 ):
(The 1666 ports scanned but not shown below are in State: Closed)
Port State Service
22/tcp Open SSH
25/tcp open SMTP
111/tcp open rpcbind
427/tcp open svrloc
631/tcp open IPP
NMAP finished: 1 IP address (1 host up) scanned in 0.244 seconds
Shelly:/etc/init. d #
Ii. How to temporarily close the service:
1. view the relationship between services and ports:
For example, view the associated processes of the IPP Service: # lsof | grep IPP
2. confirm the relationship between the service and the Port:
Sequential port service path/etc/init. d status
1) 22 SSH sshd retained
2) 25 close SMTP Postfix
3) 111 disable RPC Portmap
4) 427 disable svrloc slpd
5) 631 IPP cupsd disabled
3. How to manually close the service:
Stop SMTP:/etc/init. d/Postfix stop
Stop RPC:/etc/init. d/Portmap stop
Stop svrloc:/etc/init. d/slpd stop
Stop IPP:/etc/init. d/cupsd stop
Iii. Permanent close method:
After the system is manually disabled, the service will be started on its own every time it is started. You need to permanently disable the service from the startup configuration file:
Run the chkconfig-l command to view the current automatic loading service: (only part of the related services are intercepted)
Shelly:/etc/init. d # chkconfig-L | grep on
Cron 0: off 1: off 2: On 3: On 4: off 5: on 6: Off
Cups 0: off 1: off 2: On 3: On 4: off 5: on 6: Off
NFS 0: off 1: off 2: off 3: On 4: off 5: on 6: Off
Nfsboot 0: off 1: off 2: off 3: On 4: off 5: on 6: Off
Novell-zmd 0: off 1: off 2: off 3: On 4: On 5: on 6: Off
Nscd 0: off 1: off 2: off 3: On 4: off 5: on 6: Off
Portmap 0: off 1: off 2: off 3: On 4: off 5: on 6: Off
Postfix 0: off 1: off 2: off 3: On 4: off 5: on 6: Off
Powersaved 0: off 1: off 2: On 3: On 4: off 5: on 6: Off
Random 0: off 1: off 2: On 3: On 4: off 5: on 6: Off
Resmgr 0: off 1: off 2: On 3: On 4: off 5: on 6: Off
Slpd 0: off 1: off 2: off 3: On 4: off 5: on 6: Off
Shelly:/etc/init. d #
Close method:
Shelly:/etc/init. d # chkconfig-s cups off
Shelly:/etc/init. d # chkconfig-s NFS off
Shelly:/etc/init. d # chkconfig-s nfsboot off
Shelly:/etc/init. d # chkconfig-s Portmap off
Shelly:/etc/init. d # Shelly:/etc/init. d # chkconfig-s Postfix off
Shelly:/etc/init. d # chkconfig-s slpd off
Note: To permanently disable the association between Portmap and NFS, you must first disable the NFS and nfsboot processes. Otherwise, the following error is reported.
Shelly:/etc/init. d # chkconfig-s Portmap off
Insserv: Service Portmap has to be enabled for service NFS
Insserv: Service Portmap has to be enabled for service nfsboot
Insserv: exiting now!
/Sbin/insserv failed, exit code 1
The stop sequence is supported:
Shelly:/etc/init. d # chkconfig-s NFS off
Shelly:/etc/init. d # chkconfig-s nfsboot off
Shelly:/etc/init. d # chkconfig-s Portmap off
Shelly:/etc/init. d #
Iv. Scanning System:
Restart the system and scan the system port.
Shelly:/etc/init. d # NMAP-P0 127.0.0.1
Starting NMAP 4.00 ([url] http://www.insecure.org/nmap/#/url]) at CST
Interesting ports on localhost (127.0.0.1 ):
(The 1670 ports scanned but not shown below are in State: Closed)
Port State Service
22/tcp Open SSH
NMAP finished: 1 IP address (1 host up) scanned in 0.213 seconds
Shelly:/etc/init. d #