Tenho configurado uma caixa Linux como meu roteador. E minha rede é bem simples neste ponto:
- Tenho o roteador conectado à minha caixa de fibra, que autentica com meu ISP usando
pppd
. - Tenho uma interface ethernet,
enp2s0
que é o gateway no roteador:
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.1.1.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::20d:b9ff:fe5a:2f91 prefixlen 64 scopeid 0x20<link>
ether 00:0d:b9:5a:2f:91 txqueuelen 1000 (Ethernet)
RX packets 57348511 bytes 31510953543 (29.3 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 116229180 bytes 129467792313 (120.5 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0xf7a00000-f7a1ffff
- Tenho uma interface sem fio:
wlp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.1.1.2 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::6f0:21ff:fe91:cf90 prefixlen 64 scopeid 0x20<link>
ether 04:f0:21:91:cf:90 txqueuelen 1000 (Ethernet)
RX packets 493730 bytes 595814115 (568.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 355275 bytes 344035494 (328.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Com o qual eu gostaria que os clientes se conectassem.
- Tenho
nftables
algumas regras básicas de roteamento para direcionar o tráfego.
Meus clientes conseguem se conectar à interface ethernet sem problemas. E internet etc. funcionam como esperado. No entanto, ao conectar à interface sem fio e fazer ping:
-> % ping -I wlp65s0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.1.1.48 wlp65s0: 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
60 packets transmitted, 0 received, 100% packet loss, time 60428ms
Parece que não recebo nenhuma resposta.
No roteador, vejo o seguinte ao habilitar nftables trace
:
trace id 85cd7345 ip filter trace_chain packet: iif "ppp0" ip saddr 8.8.8.8 ip daddr 10.1.1.48 ip dscp af21 ip ecn not-ect ip ttl 61 ip id 0 ip length 84 icmp type echo-reply icmp code net-unreachable icmp id 12 icmp sequence 59 @th,64,96 0xd9d22c6700000000d1790900
trace id 85cd7345 ip filter forward packet: iif "ppp0" oif "enp2s0" ip saddr 8.8.8.8 ip daddr 10.1.1.48 ip dscp af21 ip ecn not-ect ip ttl 60 ip id 0 ip length 84 icmp type echo-reply icmp code net-unreachable icmp id 12 icmp sequence 59 @th,64,96 0xd9d22c6700000000d1790900
trace id 3626e73a ip filter trace_chain packet: iif "wlp4s0" ether saddr 48:ad:9a:9d:5e:a4 ether daddr 04:f0:21:91:cf:90 ip saddr 10.1.1.48 ip daddr 8.8.8.8 ip dscp cs0 ip ecn not-ect ip ttl 64 ip id 52040 ip length 84 icmp type echo-request icmp code net-unreachable icmp id 12 icmp sequence 60 @th,64,96 0xdad22c67000000006cd70900
trace id 3626e73a ip filter forward packet: iif "wlp4s0" oif "ppp0" ether saddr 48:ad:9a:9d:5e:a4 ether daddr 04:f0:21:91:cf:90 ip saddr 10.1.1.48 ip daddr 8.8.8.8 ip dscp cs0 ip ecn not-ect ip ttl 63 ip id 52040 ip length 84 icmp type echo-request icmp code net-unreachable icmp id 12 icmp sequence 60 @th,64,96 0xdad22c67000000006cd70900
trace id a6c3e760 ip filter trace_chain packet: iif "ppp0" ip saddr 8.8.8.8 ip daddr 10.1.1.48 ip dscp af21 ip ecn not-ect ip ttl 61 ip id 0 ip length 84 icmp type echo-reply icmp code net-unreachable icmp id 12 icmp sequence 60 @th,64,96 0xdad22c67000000006cd70900
trace id a6c3e760 ip filter forward packet: iif "ppp0" oif "enp2s0" ip saddr 8.8.8.8 ip daddr 10.1.1.48 ip dscp af21 ip ecn not-ect ip ttl 60 ip id 0 ip length 84 icmp type echo-reply icmp code net-unreachable icmp id 12 icmp sequence 60 @th,64,96 0xdad22c67000000006cd70900
O que não consigo entender.
Qualquer dica aqui será muito útil.
Se eu alterar o endereço da interface sem fio para 10.1.2.1, poderei me conectar a outros hosts na LAN/WAN.