Linux service management and firewall

Source: Internet
Author: User
I. linux operating systems are divided into independent services and non-independent services. The independent service script is placed under etcinitd.

I. linux operating systems are divided into independent services and non-independent services.

The independent service script is placed under/etc/init. d.

Non-independent service scripts are placed under/etc/xinetd. Non-independent services are managed by the independent service xinetd. If the xinetd service is disabled, all services under it will end.

Service management commands:

Chkconfig service on | off | reset restart to close the service.

Chkconfig -- add | -- del service: Delete a service or add a service. When you add a service installed with the source code package, the system will prompt that it is not supported. in this case, add the two fields chkconfig: 234 80 90 from the existing service in the comments of the service script; description: enter the description information as needed.

Chkconfig -- runlevel 234 service_name on enables this service at level 234.

Service service_name stop | start | restart | reload can load configurations without restarting.

Service service_name status to view the service status.

Enable and disable the service in ntsysv graphical mode.

II. firewall settings

The linux firewall is integrated into the kernel. when the firewall is enabled by default, only ping and ssh are not blocked.

Command usage details:

Iptables-L view the status of firewall rules.

Iptables-F clears firewall rules and the restart fails.

Service iptables stop disable firewall

Chkconfig iptables off disable the firewall.




Related Article

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.