liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

nat.nft (337B)


      1 #!/usr/bin/nft -f
      2 
      3 flush ruleset
      4 
      5 table ip nat {
      6 	chain prerouting {
      7 		type nat hook prerouting priority 0; policy accept;
      8 	}
      9 
     10 	# for all packets to WAN, after routing, replace source address with primary IP of WAN interface
     11 	chain postrouting {
     12 		type nat hook postrouting priority 100; policy accept;
     13 		oifname "ppp0" masquerade
     14 	}
     15 }
     16