This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_nat [2024/04/08 16:33] val [nftables] |
сервис_nat [2024/04/08 16:37] val [nftables] |
||
---|---|---|---|
Line 67: | Line 67: | ||
* [[https://wiki.nftables.org/wiki-nftables/index.php/Performing_Network_Address_Translation_(NAT)|Performing Network Address Translation (NAT)]] | * [[https://wiki.nftables.org/wiki-nftables/index.php/Performing_Network_Address_Translation_(NAT)|Performing Network Address Translation (NAT)]] | ||
+ | * https://wiki.debian.org/nftables | ||
<code> | <code> | ||
- | apt install nftables | + | # apt install nftables |
... | ... | ||
- | nft add rule nat postrouting ip saddr 192.168.22.0/24 oif eth1 snat to 10.5.7.122 | + | # nft add rule nat postrouting ip saddr 192.168.22.0/24 oif eth1 snat to 10.5.7.122 |
- | nft list ruleset | + | # nft list ruleset |
- | # /etc/nftables.conf | + | # file /etc/nftables.conf |
+ | |||
+ | # systemctl enable nftables.service | ||
</code> | </code> | ||