Skip to content

Commit

Permalink
Specify ipv6 for iptables and ufw rules
Browse files Browse the repository at this point in the history
  • Loading branch information
kyl191 committed Dec 28, 2024
1 parent c1ea2d9 commit 8fef88b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tasks/firewall/iptables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
jump: SNAT
action: insert
comment: "Perform NAT IPv6 readdressing"
ip_version: ipv6
when: openvpn_server_ipv6_network is defined

- name: firewall | iptables | Perform NAT readdressing with MASQUERADE
Expand All @@ -99,6 +100,7 @@
jump: MASQUERADE
action: insert
comment: "Perform NAT IPv6 readdressing"
ip_version: ipv6
when: openvpn_server_ipv6_network is defined

- name: firewall | iptables | Save existing iptables rule before start iptables service
Expand Down
4 changes: 2 additions & 2 deletions tasks/firewall/ufw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
- name: firewall | ufw | Setup IPv6 SNAT rules
ansible.builtin.blockinfile:
dest: /etc/ufw/before.rules
dest: /etc/ufw/before6.rules
state: present
insertbefore: \*filter
block: |
Expand Down Expand Up @@ -78,7 +78,7 @@
COMMIT
- name: firewall | ufw | Setup IPv6 NAT with MASQUERADE
ansible.builtin.blockinfile:
dest: /etc/ufw/before.rules
dest: /etc/ufw/before6.rules
state: present
insertbefore: \*filter
block: |
Expand Down

0 comments on commit 8fef88b

Please sign in to comment.