Skip to content

Commit

Permalink
Merge pull request #183 from traylenator/redirect
Browse files Browse the repository at this point in the history
Example how to redirect one port to another
  • Loading branch information
traylenator authored Nov 22, 2023
2 parents 3413220 + 94285e5 commit 1085e99
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1708,6 +1708,19 @@ nftables::rule {
}
```

##### Redirect port 443 to port 8443

```puppet
nftables::rule { 'PREROUTING-redirect':
content => 'tcp dport 443 redirect to :8443',
table => 'ip-nat',
}
nftables::rule{'PREROUTING6-redirect':
content => 'tcp dport 443 redirect to :8443',
table => 'ip6-nat',
}
```

#### Parameters

The following parameters are available in the `nftables::rule` defined type:
Expand Down
10 changes: 10 additions & 0 deletions manifests/rule.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
# table => 'ip6-nat'
# }
#
# @example Redirect port 443 to port 8443
# nftables::rule { 'PREROUTING-redirect':
# content => 'tcp dport 443 redirect to :8443',
# table => 'ip-nat',
# }
# nftables::rule{'PREROUTING6-redirect':
# content => 'tcp dport 443 redirect to :8443',
# table => 'ip6-nat',
# }
#
# @param ensure
# Should the rule be created.
#
Expand Down

0 comments on commit 1085e99

Please sign in to comment.