Linux System Service-inetd

Source: Internet
Author: User

InetdProcess introduction:

The inetd program isLinuxDaemon. You may already know that daemon are special programs that voluntarily give up control of calling their own terminals after being started. The interfaces of the daemon and the rest of the system can send data items only by Interprocess Communication (IPC) channel between processes, or by sending data items to the system global Log File.

The role of inetd is a "super server" for processes related to network servers such as Telnet and FTP ". This is a simple principle: not all server processes, including those that accept new Telnet and FTP connections, are called so frequently, so that a program must be running in the memory at any time. Therefore, to avoid the possibility that dozens of services are running in the memory to be used, they are all listed in the inetd configuration file/etc/inetd. conf. Instead, inetd listens for incoming connections. In this way, you only need to have a process in the memory.

Another advantage of inetd is that programmers do not want to write processes that require network connection to the system. The inetd program processes the network code and transmits the incoming network data stream to it as the Standard-In (Stdin) input for each process. The output Stdout of these processes will be sent back to the host that is connected to the process.

Note: Unless you are programming, you do not need to connect to the Stdin/Stdout function of inetd. On the other hand, if someone intends to write a simple command script program and make it appear on the network, it is worth further research into this extremely powerful function.

1. etc/inetd. conf file

The etc/inetd. conf file is the configuration file of inetd. Its structure is simple: each line of statements represents a service. The format of the service definition statement is as follows:

Srvce_name sock_type protocol [no] wait user srvr_prog srvr_prog_args

2. Security and inetd. conf files

You will find that many services are enabled by default in most linux installations. If your system will be open to the Internet, including connections through the dial-up Point-to-Point Protocol), the first thing you want to do is to close everything! Never assume that no one else will find it because your system does not publicize the public. In the opposite direction, it is easy to find and use tools and software that have security attack risks.

The first step to disable the service is to change all unnecessary service description statements in the etc/inetd. conf file to annotation statements.

In general, you will find that the following method is easier to use: first, change all things to the annotation statement to completely disable the network service), and then select to open the desired service.

After modifying the etc/inetd. conf file, you need to report to the daemon that the configuration file has been modified. This is achieved by sending an HUP signal to the daemon. First, use the following command to find the process ID corresponding to inetd. conf:

[Root @ ford/root] # ps auxw | grep inetd | grep-v grep

The output of this command is similar to the following:

Root 359 0.0 0.1 1232 168? S Jun21 0: 00 inetd

The second column in the output tells us that the process ID is 359 ). To send the HUP signal, we need to use the Kill command to call this program Kill somewhat misleading. In fact, it only sends signals to the process. By default, it sends a request to terminate a program ).

The following describes how to use the Kill command to send the HUP signal:

$ Kil-1 359

Replace "359" in the preceding command with the process number obtained from your system.

The above article introduces the inetd in the linux system service, and I hope you will gain some benefits.

  • Linux System Service init
  • How to implement virtual servers in a Linux server cluster system
  • How to customize a Secure Linux System Service Platform
  • Debugging notes for Fedora Core Linux system servers
  • Linux System Service: Apache and Tomcat integration skills
  • Manage Linux inetd servers
  • 4.3.4 interpretation of/etc/xinetd. conf and/etc/xinetd. d /*
  • Use Suse Linux to enable Ftp/xinetd

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.