Révision 94285e5f
Example how to redirect one port to another
Add example how to redirect traffic from one port to another.
REFERENCE.md | ||
---|---|---|
1708 | 1708 |
} |
1709 | 1709 |
``` |
1710 | 1710 |
|
1711 |
##### Redirect port 443 to port 8443 |
|
1712 |
|
|
1713 |
```puppet |
|
1714 |
nftables::rule { 'PREROUTING-redirect': |
|
1715 |
content => 'tcp dport 443 redirect to :8443', |
|
1716 |
table => 'ip-nat', |
|
1717 |
} |
|
1718 |
nftables::rule{'PREROUTING6-redirect': |
|
1719 |
content => 'tcp dport 443 redirect to :8443', |
|
1720 |
table => 'ip6-nat', |
|
1721 |
} |
|
1722 |
``` |
|
1723 |
|
|
1711 | 1724 |
#### Parameters |
1712 | 1725 |
|
1713 | 1726 |
The following parameters are available in the `nftables::rule` defined type: |
manifests/rule.pp | ||
---|---|---|
13 | 13 |
# table => 'ip6-nat' |
14 | 14 |
# } |
15 | 15 |
# |
16 |
# @example Redirect port 443 to port 8443 |
|
17 |
# nftables::rule { 'PREROUTING-redirect': |
|
18 |
# content => 'tcp dport 443 redirect to :8443', |
|
19 |
# table => 'ip-nat', |
|
20 |
# } |
|
21 |
# nftables::rule{'PREROUTING6-redirect': |
|
22 |
# content => 'tcp dport 443 redirect to :8443', |
|
23 |
# table => 'ip6-nat', |
|
24 |
# } |
|
25 |
# |
|
16 | 26 |
# @param ensure |
17 | 27 |
# Should the rule be created. |
18 | 28 |
# |
Formats disponibles : Unified diff