Лор, я тебя теряю!
Сделал себе домашний маршрутизатор. Веб на клиентах доступен, но не весь — часть сайтов (и этот среди них) не работают. На самом маршрутизаторе всё открывается.
Схема:
[cli] 192.168.0.2/29
|
----- 192.168.0.0/29
|
br0: 192.168.0.1/29
[rtr]
ppp0: 10.100.9.5/32
|
----- pppoe
|
[isp] 10.100.0.1/32
|
...
Клиент:
root@cli:~# curl -v -k https://www.linux.org.ru -o /dev/null
* Adding handle: conn: 0x7fab74004000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fab74004000) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to www.linux.org.ru port 443 (#0)
* Trying 178.248.233.6...
* Connected to www.linux.org.ru (178.248.233.6) port 443 (#0)
0 0 0 0 0 0 0 0 --:--:-- 0:04:59 --:--:-- 0* Operation timed out after 300448 milliseconds with 0 out of 0 bytes received
0 0 0 0 0 0 0 0 --:--:-- 0:05:00 --:--:-- 0
* Closing connection 0
curl: (28) Operation timed out after 300448 milliseconds with 0 out of 0 bytes received
Роутер:
root@rtr:~# nft list ruleset
table inet home {
chain input {
type filter hook input priority filter; policy drop;
ct state established,related accept
iifname vmap { "lo" : accept, "br0" : jump input_int }
}
chain input_int {
icmp type echo-request accept
ip saddr 192.168.0.2 tcp dport 22 accept
}
chain forward {
type filter hook forward priority filter; policy drop;
ct state established,related accept
iifname "br0" accept
}
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
oifname "ppp0" masquerade
}
}
В первом приближении пакеты проходят:
root@rtr:~# tcpdump -i br0
21:07:28.759275 IP 192.168.0.2.62653 > dns.google.domain: 11903+ A? www.linux.org.ru. (34)
21:07:28.759867 IP 192.168.0.2.55189 > dns.google.domain: 56192+ AAAA? www.linux.org.ru. (34)
21:07:28.779138 IP dns.google.domain > 192.168.0.2.62653: 11903 1/0/0 A 178.248.233.6 (50)
21:07:28.781905 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [S], seq 4008111092, win 65535, options [mss 1460,nop,wscale 4,nop,nop,TS val 1102006709 ecr 0,sackOK,eol], length 0
21:07:28.785758 IP 178.248.233.6.https > 192.168.0.2.51398: Flags [S.], seq 3128115892, ack 4008111093, win 5792, options [mss 1460,nop,wscale 9,sackOK,TS val 289594195 ecr 1102006709], length 0
21:07:28.787025 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, options [nop,nop,TS val 1102006714 ecr 289594195], length 0
21:07:28.790257 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [P.], seq 1:179, ack 1, win 8235, options [nop,nop,TS val 1102006717 ecr 289594195], length 178
21:07:28.793882 IP 178.248.233.6.https > 192.168.0.2.51398: Flags [.], ack 179, win 60, options [nop,nop,TS val 289594259 ecr 1102006717], length 0
21:07:28.798772 IP 178.248.233.6.https > 192.168.0.2.51398: Flags [P.], seq 2897:4038, ack 179, win 60, options [nop,nop,TS val 289594264 ecr 1102006717], length 1141
21:07:28.800222 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, options [nop,nop,TS val 1102006726 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:07:32.290387 IP 192.168.0.2.51315 > 178.248.233.6.https: Flags [.], ack 817493168, win 8235, length 0
21:07:33.798702 IP 178.248.233.6.https > 192.168.0.2.51398: Flags [F.], seq 4038, ack 179, win 60, options [nop,nop,TS val 289599264 ecr 1102006726], length 0
21:07:33.995497 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, options [nop,nop,TS val 1102011916 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:07:51.112302 IP 192.168.0.2.51317 > 178.248.233.6.https: Flags [.], ack 1788523727, win 8235, length 0
21:07:57.637922 IP 192.168.0.2.51377 > 178.248.233.6.https: Flags [.], ack 3270250373, win 8235, length 0
21:08:10.959408 IP 192.168.0.2.51378 > 178.248.233.6.https: Flags [.], ack 1734482898, win 8235, length 0
21:08:34.005182 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:08:47.300446 IP 192.168.0.2.51315 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:08:57.645557 IP 192.168.0.2.51377 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:09:06.122845 IP 192.168.0.2.51317 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:09:10.966172 IP 192.168.0.2.51378 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:09:34.514986 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:09:58.156700 IP 192.168.0.2.51377 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:10:02.311781 IP 192.168.0.2.51315 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:10:10.974358 IP 192.168.0.2.51378 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:10:21.132956 IP 192.168.0.2.51317 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:10:34.521112 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:11:34.526793 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:12:29.224679 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102307109 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:29.525558 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102307410 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:29.829200 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102307713 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:30.233351 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102308117 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:30.741193 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102308622 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:31.447212 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102309329 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:32.662818 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102310541 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:34.580798 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:12:34.782531 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102312662 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:36.906159 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102314783 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:39.029305 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102316904 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:41.652656 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102319524 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:43.775462 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102321645 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:45.998680 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102323864 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:48.121683 IP 192.168.0.2.51398 > 178.248.233.6.https: Flags [R.], seq 180, ack 1, win 8235, length 0
root@rtr:~# tcpdump -i ppp0
21:07:28.759660 IP 10.100.9.5.62653 > dns.google.domain: 11903+ A? www.linux.org.ru. (34)
21:07:28.760106 IP 10.100.9.5.55189 > dns.google.domain: 56192+ AAAA? www.linux.org.ru. (34)
21:07:28.778960 IP dns.google.domain > 10.100.9.5.62653: 11903 1/0/0 A 178.248.233.6 (50)
21:07:28.782236 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [S], seq 4008111092, win 65535, options [mss 1460,nop,wscale 4,nop,nop,TS val 1102006709 ecr 0,sackOK,eol], length 0
21:07:28.785532 IP 178.248.233.6.https > 10.100.9.5.51398: Flags [S.], seq 3128115892, ack 4008111093, win 5792, options [mss 1460,nop,wscale 9,sackOK,TS val 289594195 ecr 1102006709], length 0
21:07:28.787245 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, options [nop,nop,TS val 1102006714 ecr 289594195], length 0
21:07:28.790477 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [P.], seq 1:179, ack 1, win 8235, options [nop,nop,TS val 1102006717 ecr 289594195], length 178
21:07:28.793666 IP 178.248.233.6.https > 10.100.9.5.51398: Flags [.], ack 179, win 60, options [nop,nop,TS val 289594259 ecr 1102006717], length 0
21:07:28.798524 IP 178.248.233.6.https > 10.100.9.5.51398: Flags [P.], seq 2897:4038, ack 179, win 60, options [nop,nop,TS val 289594264 ecr 1102006717], length 1141
21:07:28.800404 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, options [nop,nop,TS val 1102006726 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:07:32.290679 IP 10.100.9.5.51315 > 178.248.233.6.https: Flags [.], ack 817493168, win 8235, length 0
21:07:33.798448 IP 178.248.233.6.https > 10.100.9.5.51398: Flags [F.], seq 4038, ack 179, win 60, options [nop,nop,TS val 289599264 ecr 1102006726], length 0
21:07:33.995834 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, options [nop,nop,TS val 1102011916 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:07:51.112551 IP 10.100.9.5.51317 > 178.248.233.6.https: Flags [.], ack 1788523727, win 8235, length 0
21:07:57.638168 IP 10.100.9.5.51377 > 178.248.233.6.https: Flags [.], ack 3270250373, win 8235, length 0
21:08:10.959740 IP 10.100.9.5.51378 > 178.248.233.6.https: Flags [.], ack 1734482898, win 8235, length 0
21:08:34.005553 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:08:47.300740 IP 10.100.9.5.51315 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:08:57.645805 IP 10.100.9.5.51377 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:09:06.123174 IP 10.100.9.5.51317 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:09:10.966463 IP 10.100.9.5.51378 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:09:34.515235 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:09:58.156944 IP 10.100.9.5.51377 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:10:02.312030 IP 10.100.9.5.51315 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:10:10.974612 IP 10.100.9.5.51378 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:10:21.133238 IP 10.100.9.5.51317 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:10:34.521362 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:11:34.527046 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:12:29.224932 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102307109 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:29.525815 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102307410 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:29.829507 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102307713 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:30.233681 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102308117 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:30.741447 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102308622 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:31.447466 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102309329 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:32.663073 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102310541 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:34.581053 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [.], ack 1, win 8235, length 0
21:12:34.782782 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102312662 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:36.906420 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102314783 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:39.029563 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102316904 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:41.652914 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102319524 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:43.775747 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102321645 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:45.998938 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [F.], seq 179, ack 1, win 8235, options [nop,nop,TS val 1102323864 ecr 289594259,nop,nop,sack 1 {2897:4038}], length 0
21:12:48.121943 IP 10.100.9.5.51398 > 178.248.233.6.https: Flags [R.], seq 180, ack 1, win 8235, length 0