Нет пинга на 127.0.0.1

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

Jey
Сообщения: 5

Нет пинга на 127.0.0.1

Сообщение Jey »

IP машины 192.168.0.5. НЕ идет пинг на 127.0.0.1, 192.168.0.5, но идет на машины сети 192.168.0.0. Подскажите пожалуйста, в чем причина.
Спасибо сказали:
Аватара пользователя
glenable
Сообщения: 40
ОС: Gentoo

Re: Нет пинга на 127.0.0.1

Сообщение glenable »

Jey писал(а):
20.05.2006 23:56
IP машины 192.168.0.5. НЕ идет пинг на 127.0.0.1, 192.168.0.5, но идет на машины сети 192.168.0.0. Подскажите пожалуйста, в чем причина.

loopback-интерфейс поднят?

Что говорит ifconfig?
Спасибо сказали:
Jey
Сообщения: 5

Re: Нет пинга на 127.0.0.1

Сообщение Jey »

lo интерфейс поднят. я могу на него заходить через telnet: telnet 127.0.0.1 25, telnet 127.0.0.1 110
Спасибо сказали:
Аватара пользователя
Snupt
Бывший модератор
Сообщения: 2062
Статус: No Place for RTFM Here…
ОС: Mac OS X

Re: Нет пинга на 127.0.0.1

Сообщение Snupt »

Вопрос не спецефичен дистрибутиву. Переношу в раздел "Администрирование".
Спасибо сказали:
Mixer[MsK]
Сообщения: 315
ОС: Gentoo Linux

Re: Нет пинга на 127.0.0.1

Сообщение Mixer[MsK] »

iptables -L ?
Phenom II X4 945 & 2 GB DDR3 > Gentoo 2008.0 > 2.6.30-gentoo-r5 > KDE 4.3.1
Asus eee 1003HAG > eeebuntu 3 Standart(Ubuntu 9.04) > 2.6.28-14 > GNOME 2.26.1
Спасибо сказали:
Аватара пользователя
Angel_13th
Сообщения: 1164
Статус: ...-oo=ll=oo-...
ОС: Gentoo

Re: Нет пинга на 127.0.0.1

Сообщение Angel_13th »

И вывод route в студию!
WorkStation Ubuntu 10.10 on Fujitsu-Siemens Amilo Pro 3545
Спасибо сказали:
Jey
Сообщения: 5

Re: Нет пинга на 127.0.0.1

Сообщение Jey »

Информация route

Код: Выделить всё

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     10     0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo


Информация iptables -L

Chain AllowICMPs (2 references)
target     prot opt source               destination
ACCEPT     icmp --  anywhere             anywhere            icmp fragmentation-needed
ACCEPT     icmp --  anywhere             anywhere            icmp time-exceeded

Chain Drop (1 references)
target     prot opt source               destination
RejectAuth  all  --  anywhere             anywhere
dropBcast  all  --  anywhere             anywhere
AllowICMPs  icmp --  anywhere             anywhere
dropInvalid  all  --  anywhere             anywhere
DropSMB    all  --  anywhere             anywhere
DropUPnP   all  --  anywhere             anywhere
dropNotSyn  tcp  --  anywhere             anywhere
DropDNSrep  all  --  anywhere             anywhere

Chain DropDNSrep (2 references)
target     prot opt source               destination
DROP       udp  --  anywhere             anywhere            udp spt:domain

Chain DropSMB (1 references)
target     prot opt source               destination
DROP       udp  --  anywhere             anywhere            udp dpt:135
DROP       udp  --  anywhere             anywhere            udp dpts:netbios-ns:netbios-ssn
DROP       udp  --  anywhere             anywhere            udp dpt:microsoft-ds
DROP       tcp  --  anywhere             anywhere            tcp dpt:135
DROP       tcp  --  anywhere             anywhere            tcp dpt:netbios-ssn
DROP       tcp  --  anywhere             anywhere            tcp dpt:microsoft-ds

Chain DropUPnP (2 references)
target     prot opt source               destination
DROP       udp  --  anywhere             anywhere            udp dpt:1900

Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
Ifw        all  --  anywhere             anywhere
eth0_in    all  --  anywhere             anywhere
Reject     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:INPUT:REJECT:'
reject     all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
eth0_fwd   all  --  anywhere             anywhere
Reject     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:FORWARD:REJECT:'
reject     all  --  anywhere             anywhere

Chain Ifw (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere            set ifw_wl src
DROP       all  --  anywhere             anywhere            set ifw_bl src
IFWLOG     all  --  anywhere             anywhere            state INVALID,NEW psd weight-threshold: 10 delay-threshold: 10000 lo-ports-weight: 1 hi-ports-weight: 2 IFWLOG prefix 'SCAN'

Chain OUTPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
fw2net     all  --  anywhere             anywhere
Reject     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:OUTPUT:REJECT:'
reject     all  --  anywhere             anywhere

Chain Reject (4 references)
target     prot opt source               destination
RejectAuth  all  --  anywhere             anywhere
dropBcast  all  --  anywhere             anywhere
AllowICMPs  icmp --  anywhere             anywhere
dropInvalid  all  --  anywhere             anywhere
RejectSMB  all  --  anywhere             anywhere
DropUPnP   all  --  anywhere             anywhere
dropNotSyn  tcp  --  anywhere             anywhere
DropDNSrep  all  --  anywhere             anywhere

Chain RejectAuth (2 references)
target     prot opt source               destination
reject     tcp  --  anywhere             anywhere            tcp dpt:auth

Chain RejectSMB (1 references)
target     prot opt source               destination
reject     udp  --  anywhere             anywhere            udp dpt:135
reject     udp  --  anywhere             anywhere            udp dpts:netbios-ns:netbios-ssn
reject     udp  --  anywhere             anywhere            udp dpt:microsoft-ds
reject     tcp  --  anywhere             anywhere            tcp dpt:135
reject     tcp  --  anywhere             anywhere            tcp dpt:netbios-ssn
reject     tcp  --  anywhere             anywhere            tcp dpt:microsoft-ds

Chain all2all (0 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
Reject     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:all2all:REJECT:'
reject     all  --  anywhere             anywhere

Chain dropBcast (2 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere            PKTTYPE = broadcast
DROP       all  --  anywhere             anywhere            PKTTYPE = multicast

Chain dropInvalid (2 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere            state INVALID

Chain dropNotSyn (2 references)
target     prot opt source               destination
DROP       tcp  --  anywhere             anywhere            tcp flags:!FIN,SYN,RST,ACK/SYN

Chain dynamic (2 references)
target     prot opt source               destination

Chain eth0_fwd (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state INVALID,NEW

Chain eth0_in (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state INVALID,NEW
net2all    all  --  anywhere             anywhere

Chain fw2net (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere

Chain net2all (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
Drop       all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:net2all:DROP:'
DROP       all  --  anywhere             anywhere

Chain reject (11 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere            PKTTYPE = broadcast
DROP       all  --  anywhere             anywhere            PKTTYPE = multicast
DROP       all  --  192.168.0.255        anywhere
DROP       all  --  255.255.255.255      anywhere
DROP       all  --  224.0.0.0/4          anywhere
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     icmp --  anywhere             anywhere            reject-with icmp-host-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain shorewall (0 references)
target     prot opt source               destination

Chain smurfs (0 references)
target     prot opt source               destination
LOG        all  --  192.168.0.255        anywhere            LOG level info prefix `Shorewall:smurfs:DROP:'
DROP       all  --  192.168.0.255        anywhere
LOG        all  --  255.255.255.255      anywhere            LOG level info prefix `Shorewall:smurfs:DROP:'
DROP       all  --  255.255.255.255      anywhere
LOG        all  --  224.0.0.0/4          anywhere            LOG level info prefix `Shorewall:smurfs:DROP:'
DROP       all  --  224.0.0.0/4          anywhere
Спасибо сказали:
Jey
Сообщения: 5

Re: Нет пинга на 127.0.0.1

Сообщение Jey »

попробовал удалить Shorewall. Теперь iptables -L выгядит так

Код: Выделить всё

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination


Видимо дело было не в этом B)
Спасибо сказали:
grub
Сообщения: 128
ОС: Slackware 12.0

Re: Нет пинга на 127.0.0.1

Сообщение grub »

В самом начале конфига МСЭ:

Chain AllowICMPs (2 references)
target prot opt source destination
ACCEPT icmp -- anywhere anywhere icmp fragmentation-needed
ACCEPT icmp -- anywhere anywhere icmp time-exceeded

Далее по умолчанию для всех встроеных цепочек DROP

Поскольку ping это что-то вроде запрос эха и эхо-ответ, а разрешены только сообщения о необходимости фрагментации и время вышло, то ping'и благополучно отсеиваются. В т.ч. и с локального интерфеса.

Для того чтобы на локальном интерфесе был разрешен любой трафик надо забить команды:
iptables -A INPUT 1 -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
iptables -A OUTPUT 1 -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT

И савсем не стоит грохать весь фаервол %) к томуже оно тебе надо пинговать локальный интерфейс?
Спасибо сказали: