(一)
Ping是通过icmp检测的
主机可以通过修改linux内核参数来实现,对ICMP包的忽略,从而到达通过ICMP ping不同的效果。
sysctl -w net.ipv4.icmp_echo_ignore_all=1
参数所在目录:
[root@centos4 ipv4]# cd /proc/sys/net/ipv4/
[root@centos4 ipv4]# ls
cipso_cache_bucket_size ipfrag_high_thresh tcp_fack tcp_retries1
cipso_cache_enable ipfrag_low_thresh tcp_fastopen tcp_retries2
cipso_rbm_optfmt ipfrag_max_dist tcp_fastopen_key tcp_rfc1337
cipso_rbm_strictvalid ipfrag_secret_interval tcp_fin_timeout tcp_rmem
conf ipfrag_time tcp_frto tcp_sack
icmp_echo_ignore_all ip_local_port_range tcp_invalid_ratelimit tcp_slow_start_after_idle
icmp_echo_ignore_broadcasts ip_local_reserved_ports tcp_keepalive_intvl tcp_stdurg
icmp_errors_use_inbound_ifaddr ip_nonlocal_bind tcp_keepalive_probes tcp_synack_retries
icmp_ignore_bogus_error_responses ip_no_pmtu_disc tcp_keepalive_time tcp_syncookies
icmp_msgs_burst neigh tcp_limit_output_bytes tcp_syn_retries
icmp_msgs_per_sec ping_group_range tcp_low_latency tcp_thin_dupack
icmp_ratelimit route tcp_max_orphans tcp_thin_linear_timeouts
icmp_ratemask tcp_abort_on_overflow tcp_max_ssthresh tcp_timestamps
igmp_max_memberships tcp_adv_win_scale tcp_max_syn_backlog tcp_tso_win_divisor
igmp_max_msf tcp_allowed_congestion_control tcp_max_tw_buckets tcp_tw_recycle
igmp_qrv tcp_app_win tcp_mem tcp_tw_reuse
inet_peer_maxttl tcp_autocorking tcp_min_tso_segs tcp_window_scaling
inet_peer_minttl tcp_available_congestion_control tcp_moderate_rcvbuf tcp_wmem
inet_peer_threshold tcp_base_mss tcp_mtu_probing tcp_workaround_signed_windows
ip_default_ttl tcp_challe