Skip to content

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.

@pablo2go pablo2go force-pushed the inf-176-solves-idempotency branch from b0293b8 to b319770 Compare April 2, 2020 09:18
@pablo2go pablo2go force-pushed the inf-176-solves-idempotency branch from b319770 to 9368d25 Compare April 2, 2020 09:28
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.

2 participants