root / manifests / ip_nat.pp @ c1224db5
Historique | Voir | Annoter | Télécharger (855 octets)
1 | c8092701 | tr | # manage basic chains in table ip nat |
---|---|---|---|
2 | class nftables::ip_nat inherits nftables { |
||
3 | |||
4 | nftables::config{ |
||
5 | 'ip-nat': |
||
6 | source => 'puppet:///modules/nftables/config/puppet-ip-nat.nft'; |
||
7 | } |
||
8 | |||
9 | nftables::chain{ |
||
10 | [ |
||
11 | 'PREROUTING', |
||
12 | 'POSTROUTING', |
||
13 | ]: |
||
14 | table => 'ip-nat'; |
||
15 | } |
||
16 | |||
17 | # ip-nat-chain-PREROUTING |
||
18 | nftables::rule{ |
||
19 | default: |
||
20 | table => 'ip-nat'; |
||
21 | 'PREROUTING-type': |
||
22 | order => '01', |
||
23 | content => 'type nat hook prerouting priority -100'; |
||
24 | 'PREROUTING-policy': |
||
25 | order => '02', |
||
26 | content => 'policy accept'; |
||
27 | } |
||
28 | |||
29 | # ip-nat-chain-POSTROUTING |
||
30 | nftables::rule{ |
||
31 | default: |
||
32 | table => 'ip-nat'; |
||
33 | 'POSTROUTING-type': |
||
34 | order => '01', |
||
35 | content => 'type nat hook postrouting priority 100'; |
||
36 | 'POSTROUTING-policy': |
||
37 | order => '02', |
||
38 | content => 'policy accept'; |
||
39 | } |
||
40 | } |