Article Title: Linux SECURITY: Step-by-Step fortification (2 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: Ding Wei
Use a remote management tool
It is recommended to use remote management software Webmin, the current version is 1.020-1, can be downloaded to the http://www.Webmin.com. To secure use, you need to download and install openSSL (current version is 0.96g, download in http://www.openssl.org) and Net_SSLeay.pm (current version is 1.20, download in http://www.Webmin.com ). Webmin is a tool that uses http or https browsers to manage the system by accessing http: // IP: 10000 or https: // IP: 10000. OpenSSL and Net_SSLeay.pm ensure that Webmin uses the SSL encryption method, even if https is not transmitted in plaintext.
# Install Webmin
Rpm Uvh Webmin-1.020-1.noarch.rpm
# Compile openSSL 0.9.6g
Tar xfz openssl-0.9.6g.tar.gz
Cd openssl-0.9.6g
./Config>/root/install. log
Make
Make install
# Compile the Net_SSLeay.pm Module
Tar xzf Net_SSLeay.pm-1.20.tar.gz
Cd Net_SSLeay.pm-1.20
Perl Makefile. PL
Make install
Close some services
Disable unnecessary service processes to reduce vulnerabilities. After all Red Hat Linux is installed, there will be more than 100 service processes. Although not all of them are loaded, they are prone to problems after all. Because it is a desktop application, only necessary services can be retained. The following is an example that can basically meet user needs.
# You can use chkconfig -- list to view the service processes opened by the system.
# Use chkconfig -- del to delete a specified service process
# You can move the scripts under/etc/init. d and/etc/xinet. d to a safe directory.
# Change the script running permission
# Recommended service process to be retained
Anacron
Autofs
# Used to start automatic running tasks
Crond
Gpm
Ipchains
Iptables
Keytable
# Hardware detection programs similar to PnP
Kudzu
Netfs
Network
Nfs
Nfslock
Portmap
Random
Rawdevices
# It is recommended that you replace telnet's secure logon and use an encrypted channel
Sshd
# Log monitoring process
Syslog
Telnet
Xfs
# Super daemon process
Xinetd
Unnecessary users and groups should also be deleted. Use userdel and groupdel to delete users and groups.
# Users that can be deleted
News
Uucp
Gopher
# Groups that can be deleted
News
Uucp
Dip
# Prohibit users from using dial-up connections in LAN Environments
Pppusers
Popusers
Slipusers
Disable the IP disguise and bind multiple IP addresses. Modify the/etc/host. conf file.
/Etc/host. conf
# Bind multiple IP addresses
Multi off
# IP camouflage
Nospoof on
Press Ctrl + Alt + Del to disable shutdown as needed. Modifying the/etc/inittab file can disable this function and enhance terminal window security.
/Etc/inittab
# Use Ctrl + Alt + Del to shut down the system. You can also extend the time and notify the administrator.
# Ca: ctrlaltdel:/sbin/shutdown t3 r now
Added restrictions on super daemon. Modify the/etc/xinetd. conf file to add security settings such as the remote connection time and access CIDR block. These modifications will take effect for all service processes managed by xinetd, such as telnet.
/Etc/xinetd. conf
Ults
{
Instances = 60
Log_type = SYSLOG authpriv
Log_on_success = HOST PID
Log_on_failure = HOST
Cps = 25 30
# Only the CIDR blocks 200.10.2 and 200.10.5 are allowed for access, which can be adjusted as needed
Only_from = 200.10.5.0 200.10.2.0
# Prohibit access from other network segments
No_access = 0.0.0.0
# The Access time is limited from to. You can set the access time according to the work time limit.
Access_times = 7: 00-24: 00
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