LinuxForum.Fans
Тема

Почему нет пинга шлюза

Автор: zenon 5 сообщений 3017 просмотров
#165774

192.168.0.0/24
192.168.1.0/24

Шлюз:

text
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
88.87.85.199    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 tap0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
Показать
text
$ iptables -L                                                                            ~zenon/ :)
Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere            multiport ports 49152:65535 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www 

Chain FORWARD (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere state NEW,RELATED,ESTABLISHED ACCEPT icmp -- anywhere anywhere ACCEPT icmp -- anywhere anywhere ACCEPT icmp -- anywhere anywhere ACCEPT icmp -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere REJECT all -- anywhere anywhere reject-with icmp-port-unreachable REJECT all -- anywhere anywhere reject-with icmp-port-unreachable

Chain OUTPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere anywhere state NEW,RELATED,ESTABLISHED ACCEPT icmp -- anywhere anywhere ACCEPT icmp -- anywhere anywhere ACCEPT tcp -- anywhere anywhere multiport ports 49152:65535 ACCEPT tcp -- anywhere anywhere tcp spt:www

192.168.0.5

text
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

не пойму откуда 169.254.0.0 ?? - вроде быть его отродясь не должно.

text
$ traceroute 192.168.0.1
traceroute to 192.168.0.1 (192.168.0.1), 30 hops max, 60 byte packets
 1  192.168.0.1 (192.168.0.1)  0.214 ms  0.188 ms  0.188 ms

дальше:
ping 192.168.0.1 - задумывается намертво :(
зато:

text
$ ping -c 4 ya.ru
PING ya.ru (77.88.21.3) 56(84) bytes of data.
64 bytes from www.yandex.ru (77.88.21.3): icmp_req=1 ttl=58 time=23.9 ms
64 bytes from www.yandex.ru (77.88.21.3): icmp_req=2 ttl=58 time=23.6 ms
64 bytes from www.yandex.ru (77.88.21.3): icmp_req=3 ttl=58 time=23.7 ms
64 bytes from www.yandex.ru (77.88.21.3): icmp_req=4 ttl=58 time=23.6 ms

--- ya.ru ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 23.614/23.745/23.914/0.220 ms

ы. Со шлюза до 192.168.0.5 пинги идут.

#165851

oO

text
$ cat /proc/sys/net/ipv4/icmp_echo_ignore_all
1

Сам себя в тупик поставил, а очевидного не заметил.

text
$ echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all
#165868

эт вроде в /etc/sysctl.conf накручено.

#165872

Да не - я ж говорю сам виноват- игрался как-то с параметрами sysctl - и вернуть назад ping'и забыл... smile чуть в голове себе дырку не прогрыз. :O

#165874

Вот эти по умолчанию какие не знаешь?

text
/proc/sys/net/ipv4/conf/all/rp_filter
/proc/sys/net/ipv4/conf/eth0/rp_filter
/proc/sys/net/ipv4/conf/eth1/rp_filter
/proc/sys/net/ipv4/conf/ppp0/rp_filter
/proc/sys/net/ipv6/conf/all/disable_ipv6
/proc/sys/net/ipv4/conf/all/proxy_arp
/proc/sys/net/ipv4/ip_dynaddr
Войдите или зарегистрируйтесь, чтобы ответить.