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 |