SUSE Linux operating system security reinforcement __linux

Source: Internet
Author: User
Tags closure ssh
SUSE Linux Operating system security hardening (service shutdown)

Suse Linux Operating system installation is complete, the need for security scanning, the unused port to shut down, enhance the security of the operating system
First, the system default start service:

SHELLY:/ETC/INIT.D # nmap-p0 127.0.0.1
Starting Nmap 4.00 ([Url]http://www.insecure.org/nmap/[/url]) at 2007-06-25 15:34 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 #

Second, the temporary closure of the service method:

1. View service and port associations:
For example, look at the associated process for IPP services: #lsof |grep IPP

2, confirm the relationship between service and port:
Serial Port Service Path/ETC/INIT.D state
1 SSH sshd Reservation
2 SMTP Postfix off
3-RPC Portmap shutdown
4) 427 Svrloc SLPD Close
5) 631 IPP CUPSD closed

3. Manual Shutdown Method:
Stopping Smtp:/etc/init.d/postfix stop
Stopping Rpc:/etc/init.d/portmap stop
Stopping SVRLOC:/ETC/INIT.D/SLPD stop
Stopping IPP:/ETC/INIT.D/CUPSD stop

Third, the permanent closure method:

After manual shutdown, each time the system starts, the service will start itself, requiring a permanent ban from the startup profile:
Use the Chkconfig–l command to view the current system's automatic Loading service: (only part of the relevant service is intercepted)
SHELLY:/ETC/INIT.D # chkconfig-l |grep on
Cron 0:off 1:off 2:on 3:on 4:off 5:on
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: Permanently shut down PORTMAP and NFS are associated, you must first close the NFS and nfsboot processes, otherwise there will be the following error.
SHELLY:/ETC/INIT.D # chkconfig-s Portmap off
Insserv:service Portmap has to is enabled for Service NFS
Insserv:service Portmap has to is enabled for Service Nfsboot
Insserv:exiting now!
/sbin/insserv failed, exit code 1
Support Stop Order:
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 #



Four, scanning system:

Reboot system, scan system port
SHELLY:/ETC/INIT.D # nmap-p0 127.0.0.1

Starting Nmap 4.00 ([Url]http://www.insecure.org/nmap/[/url]) at 2007-06-25 16:16 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 #

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.