Skip to content

Commit

Permalink
add option to not configure nat (#187)
Browse files Browse the repository at this point in the history
Co-authored-by: Kyle Lexmond <[email protected]>
  • Loading branch information
manuelschneider and kyl191 authored Dec 22, 2024
1 parent 1579e39 commit 09aeb80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions defaults/main/role.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ iptables_service: iptables
manage_firewall_rules: true
openvpn_firewall: auto
openvpn_masquerade_not_snat: false
openvpn_no_nat: false

# Misc
ci_build: false
Expand Down
4 changes: 2 additions & 2 deletions tasks/iptables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
jump: SNAT
action: insert
comment: "Perform NAT readdressing"
when: not openvpn_masquerade_not_snat
when: not openvpn_masquerade_not_snat and not openvpn_no_nat
notify: "save iptables"

- name: Perform NAT readdressing with MASQUERADE - iptables
Expand All @@ -80,7 +80,7 @@
jump: MASQUERADE
action: insert
comment: "Perform NAT readdressing"
when: openvpn_masquerade_not_snat
when: openvpn_masquerade_not_snat and not openvpn_no_nat
notify:
- Save iptables

Expand Down

0 comments on commit 09aeb80

Please sign in to comment.