Restrict console access to improve Linux Server Security

Source: Internet
Author: User
Article Title: Restrict console access to improve Linux server security. 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.

The console is one of the main windows for deploying Linux servers. However, after the Linux server is deployed, the console may become one of the major contributors to its security. For this reason, after the Linux server is put into production and use, you need to restrict its access. Otherwise, it may bring security risks to Linux servers.

1. Restrict console access.

All commands in Linux are reflected in files in the system. Or, files are the core of the Linux operating system. To restrict or disable access to the console, you only need to check the connection of some files. If the system administrator wants to prohibit all console access (including programs and Application Files), he can comment out the lines containing pam_console.so in all files under/etc/pam. d. For example, kde is a file in this directory. This file contains pam_lele.so. The system administrator needs to comment out all files in the directory that contain this line of content, so that all the console access can be prohibited. Of course, if the system administrator has a better understanding of the meaning of these files, you can also disable or restrict console access based on your own needs.


2. Do not use console programs.

To improve the security of the Linux Server System, the simplest and most common method adopted by many system administrators is to disable the use of related console programs. If you do not know which console programs will affect the security of the Linux operating system, you can disable all console programs. As we all know, Linux is a multi-user operating system. When other users are connected to the operating system, if a user forces the shutdown command, the data of the files being modified by other users will undoubtedly be lost. After the Linux server is deployed, you must disable the console program in some ways.

It is also relatively simple to achieve this goal, for example, through the following command:

Rm? F/etc/security/console. apps/servicename. Servicename is the name of the console program to be disabled by the system administrator. Generally, if the system administrator is familiar with these programs and has this experience to determine whether they will adversely affect the server, then you can choose to delete these programs. However, if you are not sure, delete all the related services or programs. The deletion will only affect the operations in the console. If you need these commands later, the system administrator can run these commands in other ways.

3. Disable the Xwindow service from the console application.

X Window is a graphical management tool provided by the Linux operating system, similar to the Windows operating system. X Window itself only provides guidelines for creating excuses. For example, it opens a new Window and responds to standard input of device input data, but does not contain user interfaces of the Operation Window. These functions are implemented by the window manager. X Window and the Window manager construct graphical user interfaces together, and perform related configuration according to users' usage habits, allows the system administrator to deploy the Linux operating system in a convenient operating environment.

X Window can basically be divided into two parts: X Server and X Client, which are closely integrated and displayed in front of users. X Server will drive the video card to display various graphics on the screen and drive some input devices so that users can use these standard input interfaces, to interact with applications on the operating system. X Clinet puts forward request services to X Server in combination with applications, and displays the services on the screen in a window after running. This design method of X Window makes the functions of the Linux operating system very powerful. If related configuration is used, the system administrator can run X Server and X Client on different computers. For example, if some servers only need to connect to them through the network, they can run their X Window application on a host and then return the results to the local screen. Instead of enabling the X Window service, the CPU and memory resources on the server are fully applied.

However, I found that many system administrators are not used to deploying related application services in the command line window. For example, when deploying a database system or file server, you want to start a graphical Management window for configuration. Therefore, they will habitually install X Window when installing the Linux operating system. Although X Window provides a graphical interface similar to the Microsoft operating system. For example, KDE (one of X Windows) has its own Window management program, file administrator, network tool program, multimedia application program, and so on. In terms of appearance and functionality, it can be comparable to that of Windows operating systems. However, running this X Window graphical interface consumes a lot of system resources and affects the server operation efficiency. It also leaves hidden risks to its security. I have two suggestions for this.

 

[1] [2] Next page

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.