Answer the question
In order to leave comments, you need to log in
Why don't packets go in linux router?
So, there is a box with Linux. eth0 looks at the local network 192.168.1.0/24, eth2 looks at the modem with the Internet (moved to a separate subnet 192.168.0.0/24)
Interface configuration:
# eth2
allow-hotplug eth2
iface eth2 inet static
address 192.168.0.28
netmask 255.255.255.0
gateway 192.168.0.1
# internal eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
Ethernet adapter Ethernet 2:
DNS-суффикс подключения . . . . .
IPv4-адрес. . . . . . . . . . . . : 192.168.1.2
Маска подсети . . . . . . . . . . : 255.255.255.0
Основной шлюз. . . . . . . . . : 192.168.1.1
ping 192.168.0.28 -n 100
Обмен пакетами с 192.168.0.28 по с 32 байтами данных:
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
Превышен интервал ожидания для запроса.
tcpdump -i eth0 icmp -vv
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:36:12.450762 IP (tos 0x0, ttl 128, id 472, offset 0, flags [none], proto ICMP (1), length 60)
<b>192.168.1.2 > 192.168.0.28: ICMP echo request</b>, id 1, seq 1114, length 40
tcpdump -i eth2 icmp -vv
tcpdump: listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes
15:36:32.449836 IP (tos 0x0, ttl 64, id 45882, offset 0, flags [none], proto ICMP (1), length 60)
192.168.0.28 > 192.168.1.2: ICMP echo reply, id 1, seq 1118, length 40
ping -I eth0 192.168.0.28
PING 192.168.0.28 (192.168.0.28) from 192.168.1.1 eth0: 56(84) bytes of data.
From 192.168.1.1 icmp_seq=1 Destination Host Unreachable
From 192.168.1.1 icmp_seq=2 Destination Host Unreachable
From 192.168.1.1 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.0.28 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5023ms
pipe 3
Answer the question
In order to leave comments, you need to log in
In general, I never understood why this was happening, but reinstalling solved the problem. Most likely something is crooked. Now everything works.
try iptables -P FORWARD ACCEPT and check the iptables rules. The previously specified command will not help if there are explicitly prohibiting rules.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question