About the port shutdown--linux

Source: Internet
Author: User

This article originates from: Http://blog.csdn.net/svitter

Citation derived from: http://bbs.chinaunix.net/thread-775649-1-1.html


1. Turn off Service service services stop

Netstat-ntlp

Kill-9 PID

2. Use of two methods

1.PS Aux|grep Port

Kill-9 PID

2.iptables-i input-p TCP--dport port number-j DROP

3. View the Service

grep 8080/etc/services

wangyl1977   published 2006-6-18 19:21
grep 8080/etc/services

webcache         8080/tcp                        # WWW Caching service
webcache     & nbsp;  8080/udp                     & nbsp  # WWW Caching Service

[quote] Original post by   Span style= "Word-wrap:break-word" >wumu888   published on 2006-6-18 18:54


[/quote]
It's just a "Service_name/protocol & Port" comparison.
If you change the Apache listen port to 12345, then NETSTAT-LP will see that port 12345 is listening
If you add a 12345 port description in the/etc/services, the previous comment is platinum, then NETSTAT-LP will become the Platinum service.
If you use Iptables to do a DROP on the port, IPTABLES-VL will see the same effect.
This is defined in/etc/nsswitch.conf, service parsing using files
This feature belongs to/lib/libnss_files.so.1 and/lib/libnss_files.so.2

About/etc/services There are a lot of people misunderstand, think that delete/Add a row of data, you can turn off/open a service, this is wrong concept, I say here

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.