Chinaunix

标题: 怎么才能不响应别人的ping呀 [打印本页]

作者: 卐伪装卐    时间: 2010-08-30 08:15
标题: 怎么才能不响应别人的ping呀
[color=Green]使对任何ping请求不响应,重启后有效?怎么设的呀!请还记得的指教下,谢谢!!!
作者: 一路征程一路笑    时间: 2010-08-30 08:58
提示: 作者被禁止或删除 内容自动屏蔽
作者: obsd178    时间: 2010-09-03 19:42
2楼正解不要重启 亦可以修改 /etc/sysctl 相关键值
作者: 卐伪装卐    时间: 2010-09-03 20:46
回复 3# obsd178


    嗯,/proc是个虚拟目标,重启就没有了,应该放在/etc/sysctl里的,
作者: chenyx    时间: 2010-09-03 21:02
修改/etc/sysctl 键值,重启有效
作者: obsd178    时间: 2010-09-04 12:51
修改/etc/sysctl 键值,重启有效
chenyx 发表于 2010-09-03 21:02



    sysctl -p 即可生效!
作者: ulovko    时间: 2012-05-26 12:44
http://blog.chinaunix.net/uid-25256412-id-91426.html

Ipsysctl-tutorial:  http://www.frozentux.net/documents/ipsysctl-tutorial/
  1. 【With the sysctl application】:
  2. The sysctl application can be used to either set variables through the command line, or to set a larger set of variables through a configuration file as previously described. sysctl may also set several variables through the command line at once if need be, and it may also be used to list all variables and their respective values.

  3. 1.1. First of all, to list all variables possible you could issue the following command:

  4. [root@rhel5 ~]# sysctl -a  →→ to list all variables
  5. [root@rhel5 ~]# sysctl net.ipv4.tcp_sack   →→ to read a specific variable
  6. [root@rhel5 ~]# sysctl -w net.ipv4.tcp_sack=0  →→ to set a value

  7. 1.2. Reload /etc/sysctl.conf
  8. [root@rhel5 ~]# sysctl -p  →→ to load all of the settings we have in the /etc/sysctl.conf file
  9. [root@rhel5 ~]# sysctl -p /etc/testsysctl.conf →→ load the testsysctl.conf configuration options instead of our default file

  10. 【With /proc】:
  11. 1.1. It may be a very bad idea to turn on ip_forward before we have all the firewall rules and routes up and running.

  12. [root@rhel5 ~]# echo "1" > /proc/sys/net/ipv4/tcp_sysncookies →→ 默认值是1,开启防御SYN Flood攻击
  13. [root@rhel5 ~]# echo "1" > /proc/sys/net/ipv4/ip_forward →→ 默认值是0,开启ip_forward

  14. 1.2.icmp_echo_ignore_all
  15. If this is variable is turned on, you and others will be unable to ping the machine in question which is generally a bad thing. Of course, everyone has different opinions about this,

  16. some say it is good because people will be unable to ping you and hence know you are there, some say it is bad because you want people to know you are available on the internet.

  17. A lot of tools and applications rely upon ICMP Echo requests, some good, some bad as always.

  18. [root@rhel5 ~]# echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all →→默认值是0,所谓的(Disable death of PING);
复制代码





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2