Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

pablo2go
Copy link

No description provided.

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
Copy link
Author

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
Copy link
Author

@pablo2go pablo2go Mar 26, 2020

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.

: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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove dupiicates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant