Experience in dialing server maintenance in Linux

Source: Internet
Author: User
Article Title: Experience in dialing server maintenance in Linux. 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 Maintenance and Management of dial-up servers is a complicated task for servers and clients and software and hardware. It requires administrators to practice more and be good at induction and summarization. Only in this way can they form a set of effective management experience and methods.
  
   1. Check physical lines
When the client cannot dial in, the server must first check whether the physical line is smooth, that is, check the connection between the modem and the server's serial port. An external modem and a server serial port (COM1 or COM2) are usually connected using a standard RS-232C cable. Using minicom can easily detect the connectivity of the cable. Minicom is a practical tool that can run on Linux systems. It is mainly used to realize the communication between the system and the modem and to control the modem. In the Linux terminal status, enter the command: minicom. The initial modem is displayed on the screen, and "OK" is displayed after the welcome information is displayed, indicating that the system is connected smoothly with the modem, otherwise, check whether the cable connector is loose. Sometimes, it cannot be seen that the cable connector is slightly loose, so using minicom will be handy. In fact, when solving general network faults, we start from checking the connectivity of physical lines.
  
   2. Check the/var/lock/LCK .. ttySx device to lock the file
Because the modem is a dedicated resource, when a user uses this resource, other users cannot use it until the previous user releases the resource, linux uses a device lock file to control the use of the device. Files locked by the device can be in the following two situations:
  
When the modem power on the server is off, the device is disconnected from the computer. The system automatically generates a device lock file in the/var/lock/directory, indicating that the device is currently unavailable, at this time, the customer cannot dial in. For specific serial ports, such as LCK .. ttyS0 or LCK .. ttyS1 file. When the modem power is on, the locked file disappears after several seconds, and the device returns to the accepted dial-in status.
  
After a dial-up user successfully dials in, a device lock file for a specific serial port will also be generated in the/var/lock/directory. The lock file indicates that an existing user is using this exclusive device, other users cannot use this device at this time. After the dial-in user is disconnected, the locked file will be automatically released soon, and the user waiting for the dial-in can now dial in. The main purpose of checking the locked file is to check whether the server-side modem is powered on.
  
   Iii. Check the IP forwarding function
When you dial the server to connect to the Internet, the server kernel must support IP Forwarding and allow IP forwarding, otherwise, the client can only ping the dial-up server but not other servers or local gateways. Run the following command to check whether the IP forwarding function of the current system is Enabled:
  
Cat/proc/sys/net/ipv4/ip_forward
  
If the output is 1, the IP forwarding function is enabled. If the output is 0, this function is disabled, you can use the command "echo 1>/proc/sys/net/ipv4/ip_forward" to enable this function. However, this function is not permanent. After you restart the system, it will be restored to the previously set value. To enable and keep this function effective, the simplest way is to modify/etc/sysclt as root. conf file. Find: net. ipv4.ip _ forward = 0. Replace "0" with "1". The value takes effect after the system is restarted.
  
   4. Check the setuid bit of pppd
If the user enters the user name and password in the terminal window that appears after the modem is connected, the following information appears:
  
-Pppd: must be root to run-pppd, since it is not setuid-root
  
This is because, for security reasons, pppd can only be run by root users or users with root permissions, while the dial-up users created by the system do not have permission to run pppd. You can solve this problem by setting the setuid bit on pppd. Set setuid on an executable binary file so that other users can run the program as the file owner. Enter the following command to set the setuid bit of pppd:
  
Chmod 4755/usr/sbin/pppd
  
Because the pppd file owner is root, normal users (such as created Dial-Up users) can execute the program as root users. In addition, when running the linuxconf program, because it needs to check the security of the file system, the setuid bit of pppd is sometimes deleted. Therefore, after running linuxconf, check the attribute settings of pppd.

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.