SoFunction
Updated on 2025-03-10

Brief description of operating system security prevention: Linux


As a symbol of freedom and openness, Linux has attracted more and more attention from users, but there are fewer individual users who really use it, mainly because of its system characteristics and fewer software developers around it, making it popular only in the field of server systems. The author briefly introduces its security protection:

1. Disable access to important files

Unlike Windows, Linux not only publishes source code, but also can be modified at will according to user needs. Some key files in the system, such as and, can also be modified by (remote logged in to users). In order to protect the system security, its properties can be modified in advance to prevent illegal intrusion and modification.

First enter the Linux command interface and enter the command:

# chmod 600 /etc/

Change the file attribute to 600.

Enter the command again:

# chattr +i /etc/

Ensure that the file owner is root.

In this way, any changes to the file will be prohibited. Only by passing the command:

# chattr -i /etc/

The root reset flag can only be modified.

2. Disable remote access

In Linux, you can use the two files /etc/ and /etc/ to allow and prohibit access to local services by remote hosts. The method is: enter the Linux command interface, call up the file, and add the following instructions:

# Deny access to everyone.

ALL: ALL@ALL

All services are prohibited from all external hosts unless permitted by the file.

In the file, add the host that allows access as follows:

Call out the file and add the following command:

#Just an example:

http: 192.168.1.8

It means that machines with IP address 192.168.18 and host name are allowed to access http services as clients.

The author has introduced the system's security protection method, and it is impossible to cover everything. Users who use Windows XP and other "NT core" systems should pay more attention to security issues. When using XP, it is best to turn on the included firewall (Microsoft also sets the firewall to be turned on by default in the newly released Windows XP). Users of any system should have certain security knowledge, such as: not easily leaking their own network and system information; not executing programs of unknown origin, etc. A safe system environment must be created by yourself.
(Source: China Computer Education News)