История изменений
Исправление Dodik, (текущая версия) :
Стоп. Мы точно про форвард маршрутизатора говорим? Тот самый что в инет фигачит? И он сквозняк? хм.
Да. Это форвард марша, но это таблица input. Для инета же используется таблица nat.
Для полной картины выкладываю все правила
table ip filter {
chain INPUT {
type filter hook input priority filter; policy accept;
ct state established,related counter packets 91 bytes 7996 accept
ct state invalid counter packets 0 bytes 0 drop
iifname "lo" counter packets 0 bytes 0 accept
icmp type echo-request meta length 93-65535 counter packets 0 bytes 0 drop
ip protocol icmp counter packets 0 bytes 0 accept
ip saddr { 172.25.1.0/24, 172.25.76.240/28 } tcp dport 22 counter packets 0 bytes 0 accept
counter packets 0 bytes 0 drop
}
chain FORWARD {
type filter hook forward priority filter; policy accept;
ct state established,related counter packets 1434 bytes 575500 accept
ct state invalid counter packets 1 bytes 40 drop
}
chain OUTPUT {
type filter hook output priority filter; policy accept;
}
}
table ip nat {
chain PREROUTING {
type nat hook prerouting priority dstnat; policy accept;
udp dport 60000 counter packets 0 bytes 0 dnat to 172.25.76.242:60000
}
chain POSTROUTING {
type nat hook postrouting priority srcnat; policy accept;
ip saddr { 172.25.1.0/24, 172.25.76.240/28, 172.25.91.0/29, 172.25.91.32/27 } oifname "enp37s0" snat to мой-белый-ip
}
}
Исходная версия Dodik, :
Стоп. Мы точно про форвард маршрутизатора говорим? Тот самый что в инет фигачит? И он сквозняк? хм.
Да. Это форвард марша, но это таблица input. Для инета же используется таблица nat.
Для полной картины выкладываю все правила
table ip filter {
chain INPUT {
type filter hook input priority filter; policy accept;
ct state established,related counter packets 91 bytes 7996 accept
ct state invalid counter packets 0 bytes 0 drop
iifname "lo" counter packets 0 bytes 0 accept
icmp type echo-request meta length 93-65535 counter packets 0 bytes 0 drop
ip protocol icmp counter packets 0 bytes 0 accept
ip saddr { 172.25.1.0/24, 172.25.76.240/28 } tcp dport 22 counter packets 0 bytes 0 accept
ip saddr 172.30.254.192/26 counter packets 0 bytes 0 accept
counter packets 0 bytes 0 drop
}
chain FORWARD {
type filter hook forward priority filter; policy accept;
ct state established,related counter packets 1434 bytes 575500 accept
ct state invalid counter packets 1 bytes 40 drop
}
chain OUTPUT {
type filter hook output priority filter; policy accept;
}
}
table ip nat {
chain PREROUTING {
type nat hook prerouting priority dstnat; policy accept;
udp dport 60000 counter packets 0 bytes 0 dnat to 172.25.76.242:60000
}
chain POSTROUTING {
type nat hook postrouting priority srcnat; policy accept;
ip saddr { 172.25.1.0/24, 172.25.76.240/28, 172.25.91.0/29, 172.25.91.32/27 } oifname "enp37s0" snat to мой-белый-ip
}
}