![Strongswan e nftables (migrando do iptables)](https://rvso.com/image/756793/Strongswan%20e%20nftables%20(migrando%20do%20iptables).png)
Estou tentando migrar do iptables para o nftables (Debian) e me deparei com as regras da VPN Strongswan. Alguém pode me ajudar a traduzir essas regras para nftables? O conversor automático não conseguiu fazê-los.
# -t filter -A FORWARD -s 10.10.10.2/24 -m policy --dir in --pol ipsec --proto esp -j ACCEPT -m comment --comment VPN forwarding
# -t nat -A POSTROUTING -s 10.10.10.0/24 -o eth0 -m policy --dir out --pol ipsec -j ACCEPT
# -t mangle -A FORWARD -s 10.10.10.0/24 -o eth0 -p tcp -m policy --dir in --pol ipsec -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1361:1536 -j TCPMSS --set-mss 1360
Responder1
Eu tenho um ambiente virtual de teste local:
Client A <--> Strongswan Peer A <--> Strongswan Peer B <--> Client b
No ponto A e no ponto B:
nft add table nat
nft add chain nat postrouting { type nat hook postrouting priority 0 \; }
nft add rule nat postrouting masquerade
Também em ambos os pares eu tive que:
sysctl -w net.ipv4.ip_forward=1
E funcionou para mim.