-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INF-176 solves idempotency #1
base: master
Are you sure you want to change the base?
Conversation
tasks/nat.yml
Outdated
jump: MASQUERADE | ||
notify: persist iptables | ||
loop: "{{ vpn_gateway_configs[0].local.networks }} + {{ vpn_gateway_configs[0].remote.networks }}" | ||
- name: Load firewall rules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run as a handler.
tasks/nat.yml
Outdated
- name: Upload firewall rules | ||
template: | ||
src: iptables-rules.j2 | ||
dest: /tmp/iptables-rules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Store in /etc/ and trigger the handler.
- After reboot rules should be there.
templates/iptables-rules.j2
Outdated
:POSTROUTING ACCEPT [1:76] | ||
{% for network in vpn_gateway_configs[0].local.networks %} | ||
-A POSTROUTING -s "{{ network }}" -j MASQUERADE | ||
-A POSTROUTING -s "{{ network }}" -j MASQUERADE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dupiicates.
b0293b8
to
b319770
Compare
b319770
to
9368d25
Compare
No description provided.