This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
сервис_nat [2025/07/14 08:26] val [Сервис NAT] |
сервис_nat [2025/09/22 08:53] (current) val [nftables] |
||
---|---|---|---|
Line 75: | Line 75: | ||
gate# nft add table nat | gate# nft add table nat | ||
+ | |||
+ | gate# nft list tables | ||
gate# nft 'add chain nat postrouting { type nat hook postrouting priority srcnat ; }' | gate# nft 'add chain nat postrouting { type nat hook postrouting priority srcnat ; }' | ||
Line 94: | Line 96: | ||
type nat hook postrouting priority srcnat; policy accept; | type nat hook postrouting priority srcnat; policy accept; | ||
ip saddr 192.168.100+X.0/24 oif "eth1" snat to 172.16.1.X | ip saddr 192.168.100+X.0/24 oif "eth1" snat to 172.16.1.X | ||
+ | #oifname "eth1" masquerade | ||
} | } | ||
} | } |