User Tools

Site Tools


сервис_nat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
сервис_nat [2024/04/08 16:06]
val
сервис_nat [2024/04/23 13:15]
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>​
-nft add rule nat postrouting ip saddr 192.168.22.0/​24 oif eth1 snat to 10.5.7.122+gate### apt install nftables
  
-nft list ruleset+gate# nft add table nat 
 + 
 +gate# nft add rule nat postrouting ip saddr 192.168.X.0/​24 oif eth1 snat to 172.16.1.254 
 + 
 +gate# nft list ruleset 
 + 
 +gate# file /​etc/​nftables.conf 
 + 
 +gate# systemctl enable nftables.service
 </​code>​ </​code>​
  
сервис_nat.txt · Last modified: 2024/05/06 16:17 by val