Skip to content

Commit

Permalink
ipv6 nat fix (trailofbits#1775)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackivanov authored Apr 25, 2020
1 parent 4f1b927 commit 27de760
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/common/templates/rules.v6.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ COMMIT
-A PREROUTING --in-interface {{ ansible_default_ipv6['interface'] }} -p udp --dport {{ wireguard_port_avoid }} -j REDIRECT --to-port {{ wireguard_port_actual }}
{% endif %}
# Allow traffic from the VPN network to the outside world, and replies
-A POSTROUTING -s {{ subnets|join(',') }} -m policy --pol none --dir out -j SNAT --to {{ ipv6_egress_ip | ipaddr('address') }}
-A POSTROUTING -s {{ subnets|join(',') }} -m policy --pol none --dir out {{ '-j SNAT --to ' + ipv6_egress_ip | ipaddr('address') if alternative_ingress_ip else '-j MASQUERADE' }}

COMMIT

Expand Down

0 comments on commit 27de760

Please sign in to comment.