Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Router Ansible Role
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
KSZK
Sysadmin
Kubernetes
Router Ansible Role
Commits
5d011c95
Commit
5d011c95
authored
3 years ago
by
Rafael László
Browse files
Options
Downloads
Patches
Plain Diff
template nftables accepted ports
parent
dce5a59b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
defaults/main.yml
+5
-0
5 additions, 0 deletions
defaults/main.yml
templates/etc/nftables.conf.j2
+5
-1
5 additions, 1 deletion
templates/etc/nftables.conf.j2
with
10 additions
and
1 deletion
defaults/main.yml
+
5
−
0
View file @
5d011c95
...
@@ -10,6 +10,11 @@ lan_port: ens224
...
@@ -10,6 +10,11 @@ lan_port: ens224
# dnat:
# dnat:
# - dport: 6443
# - dport: 6443
# to: 192.168.69.1:6443
# to: 192.168.69.1:6443
# accept:
# - saddr: 152.66.0.0/16
# dport: 10022
# - saddr: 10.0.0.0/8
# dport: 10022
# netplan:
# netplan:
# network:
# network:
...
...
This diff is collapsed.
Click to expand it.
templates/etc/nftables.conf.j2
+
5
−
1
View file @
5d011c95
...
@@ -22,7 +22,11 @@ table inet filter {
...
@@ -22,7 +22,11 @@ table inet filter {
ip protocol icmp accept
ip protocol icmp accept
tcp dport {{ ssh_port | default("10022", true) }} accept comment "SSH in"
{% if nftables.accept is defined %}
{% for accept in nftables.accept %}
ip saddr {{ accept.saddr }} tcp dport {{ accept.dport }} accept comment "{{ accept.comment }}"
{% endfor %}
{% endif %}
}
}
chain forward {
chain forward {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment