1
jasontse 2017-07-19 19:55:31 +08:00 via iPad
nft add rule nat prerouting daddr 192.168.99.0/24 tcp redirect to 1234
你试试看吧 |
2
jarell OP @jasontse 显示下面这个
<cmdline>:1:25-29: Error: syntax error, unexpected daddr add rule nat prerouting daddr 192.168.99.0/24 tcp redirect to 1234 ^^^^^ |
3
jarell OP # nft add rule nat prerouting ip daddr 192.168.99.0/24 tcp redirect to 1234
<cmdline>:1:54-61: Error: syntax error, unexpected redirect add rule nat prerouting ip daddr 192.168.99.0/24 tcp redirect to 1234 |
4
gesse 2022-08-24 23:40:39 +08:00
root@xxx:~# iptables-translate -t nat -A PREROUTING -d 192.168.99.0/24 -p tcp -j REDIRECT --to-ports 1234
nft add rule ip nat PREROUTING ip protocol tcp ip daddr 192.168.99.0/24 counter redirect to :1234 PS: iptables-translate 需要 iptables 版本 1.8 |