데비안 8, ping 127.0.0.1이 작동하지 않습니다

데비안 8, ping 127.0.0.1이 작동하지 않습니다

내 데비안 8에서는 `uname -a'가 다음을 제공합니다:

Linux uname 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux

시험을 마친

route -n다음을 제공합니다:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.2        0.0.0.0         UG    1024   0        0 eth0
10.0.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

다른 네트워크 기능은 괜찮습니다.

어떻게 ping 127.0.0.1출근할 수 있나요? 이것이 다음 !lo규칙 인 것 같지만 iptables이를 수정하고 변경 사항을 지속시키는 방법을 모르겠습니다.

3591 2197K ACCEPT     all  --  !lo    any     anywhere             anywhere            

줄은 다음과 같습니다 -A INPUT ! -i lo -j ACCEPT ./etc/iptables.up.rules

삭제하시겠습니까 !?

답변1

아니요, Jesse는 기본적으로 차단하지 않았습니다.

ping -c 4 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.050 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.056 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.054 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.044 ms

--- 127.0.0.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.044/0.051/0.056/0.004 ms

디스플레이 iptables -Lcat /etc/hosts cat /etc/hostname

답변2

데비안 8은 설치 시 iptables루프백 액세스를 거부하는 것 같습니다.localhost

디버거와 같은 많은 프로그램이 제대로 작동하려면 이 기능이 필요하므로 내 설정에서 어떻게 비활성화할 수 있는지 이해할 수 없습니다.

수정 사항은 다음과 같습니다.

/etc/iptables.up.rules앞머리를 제거하여 루트 편집 및 변경 -A INPUT ! -i lo -j ACCEPT!-A INPUT -i lo -j ACCEPT

관련 정보