This repository has been archived by the owner on Jun 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- branch based off of @nopdotcom's PR #1361 - initial commit for supporting all VPNs over IPv6
- Loading branch information
Showing
36 changed files
with
229 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
upstream_dns_servers: | ||
- 8.8.8.8 | ||
- 8.8.4.4 | ||
|
||
upstream_dns_servers_v6: | ||
- "2001:4860:4860::8888" | ||
- "2001:4860:4860::8844" | ||
|
||
streisand_client_test: no | ||
|
||
streisand_site_vars: "{{ lookup('env','HOME') }}/.streisand/site.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
playbooks/roles/openconnect/templates/ocserv-ipv6tables.service.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Set the firewall rules required for ocserv | ||
After=network.target | ||
Before=ocserv.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=true | ||
ExecStart=/sbin/{{ ocserv_firewall_rule_v6 }} | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
client | ||
remote {{ openvpn_server }} {{ openvpn_port_udp }} | ||
proto udp | ||
{% if streisand_ipv6_address is defined %} | ||
remote {{ streisand_ipv6_address }} {{ openvpn_port_udp }} udp6 | ||
{% endif %} | ||
remote {{ openvpn_server }} {{ openvpn_port_udp }} udp | ||
{% include "client-common.j2" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
client | ||
remote {{ openvpn_server }} {{ openvpn_port }} | ||
proto tcp | ||
{% if streisand_ipv6_address is defined %} | ||
remote {{ streisand_ipv6_address }} {{ openvpn_port}} tcp6 | ||
{% endif %} | ||
remote {{ openvpn_server }} {{ openvpn_port }} tcp | ||
{% include "client-common.j2" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
client | ||
remote {{ openvpn_server }} {{ openvpn_port_sslh }} | ||
proto tcp | ||
{% if streisand_ipv6_address is defined %} | ||
remote {{ streisand_ipv6_address }} {{ openvpn_port_sslh }} tcp6 | ||
{% endif %} | ||
remote {{ openvpn_server }} {{ openvpn_port_sslh }} tcp | ||
{% include "client-common.j2" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
server 10.8.0.0 255.255.255.0 | ||
push "dhcp-option DNS {{ dnsmasq_openvpn_tcp_ip }}" | ||
proto tcp | ||
proto tcp6 | ||
|
||
{% if streisand_ipv6_address is defined %} | ||
server-ipv6 2001:db8:0:124::/64 | ||
push "dhcp-option DNS6 {{ dnsmasq_openvpn_tcp_ipv6 }}" | ||
{% endif %} | ||
|
||
port {{ openvpn_port }} | ||
{% include "etc_openvpn_server_common.j2" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
playbooks/roles/openvpn/templates/etc_openvpn_server_udp.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
server 10.9.0.0 255.255.255.0 | ||
push "dhcp-option DNS {{ dnsmasq_openvpn_udp_ip }}" | ||
proto udp | ||
|
||
{% if streisand_ipv6_address is defined %} | ||
server-ipv6 2001:db8:0:123::/64 | ||
push "dhcp-option DNS6 {{ dnsmasq_openvpn_udp_ipv6 }}" | ||
{% endif %} | ||
|
||
proto udp6 | ||
port {{ openvpn_port_udp }} | ||
{% include "etc_openvpn_server_common.j2" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Listen on the OpenVPN TCP and UDP addresses | ||
listen-address={{ dnsmasq_openvpn_tcp_ipv6 }},{{ dnsmasq_openvpn_udp_ipv6 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,43 @@ | ||
--- | ||
- name: Ensure UFW allows DNS requests from WireGuard clients | ||
- name: "Ensure UFW allows DNS requests from WireGuard clients" | ||
ufw: | ||
to_port: "53" | ||
proto: "udp" | ||
rule: "allow" | ||
from_ip: "10.192.122.0/24" | ||
|
||
- name: Ensure UFW allows WireGuard | ||
- name: "Ensure UFW allows DNS requests from WireGuard IPv6 clients" | ||
ufw: | ||
to_port: "53" | ||
proto: "udp" | ||
rule: "allow" | ||
from_ip: "fde9:7496:c3d7:a47f::/64" | ||
when: streisand_ipv6_address is defined | ||
|
||
- name: "Ensure UFW allows WireGuard" | ||
ufw: | ||
to_port: "{{ wireguard_port }}" | ||
proto: "udp" | ||
rule: "allow" | ||
|
||
- name: Allow WireGuard through the firewall | ||
- name: "Allow WireGuard through the firewall" | ||
command: "{{ item }}" | ||
with_items: "{{ wireguard_firewall_rules }}" | ||
|
||
- name: "Add WireGuard firewall persistence service to init" | ||
- name: "Allow WireGuard over IPv6 through the firewall" | ||
command: "{{ item }}" | ||
with_items: "{{ wireguard_firewallv6_rules }}" | ||
when: streisand_ipv6_address is defined | ||
|
||
- name: "Add WireGuard firewall persistence service" | ||
template: | ||
src: streisand-wireguard-service.sh.j2 | ||
dest: /etc/init.d/streisand-wireguard | ||
mode: 0755 | ||
src: wireguard-iptables.service.j2 | ||
dest: /etc/systemd/system/wireguard-iptables.service | ||
mode: 0644 | ||
|
||
- name: "Enable the streisand-wireguard init service" | ||
service: | ||
name: streisand-wireguard | ||
- name: "Enable the wireguard-iptables service" | ||
systemd: | ||
daemon_reload: yes | ||
name: wireguard-iptables.service | ||
enabled: yes | ||
state: started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.