-
Notifications
You must be signed in to change notification settings - Fork 2k
WIP: Streisand IPv6 support #1471
base: master
Are you sure you want to change the base?
Changes from all commits
b699159
a4651b7
dd16cc7
088b400
af78894
deed63c
49c081f
f1f6f8b
7403067
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# IPv6 Status | ||
|
||
IPv6 support has been tested on the following providers with successful results: | ||
|
||
- DigitalOcean | ||
- Linode | ||
- Vultr using localhost install |
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" |
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing a trailing newline. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,10 @@ ocserv_path: "/etc/ocserv" | |
ocserv_ca: "{{ ocserv_path }}/ca" | ||
ocserv_config_file: "{{ ocserv_path }}/ocserv.conf" | ||
ocserv_firewall_rule: "iptables --wait {{ streisand_iptables_wait }} -t nat -A POSTROUTING -j MASQUERADE" | ||
ocserv_firewall_rule_v6: "ip6tables --wait {{ streisand_iptables_wait }} -t nat -A POSTROUTING -j MASQUERADE" | ||
|
||
ocserv_ipv4_network: "192.168.1.0/24" | ||
ocserv_ipv6_network: "fda9:4efe:7e3b:03ea::/48" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, we should generate a ULA per Streisand system. For ocserv we'd only want a /64, though? |
||
|
||
ocserv_days_valid: "1825" | ||
ocserv_pid_file: "/var/run/ocserv.pid" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dev tun | ||
dev tun-ipv6 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be conditional on having IPv6 enabled, or do we want this always-on because it will catch IPv6 leaks or something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll have to test this scenario to check for leaks, thanks for pointing it out |
||
cipher {{ openvpn_cipher }} | ||
auth {{ openvpn_auth_digest }} | ||
resolv-retry infinite | ||
|
@@ -10,7 +10,8 @@ verify-x509-name {{ openvpn_server_common_name.stdout }} name | |
tls-version-min 1.2 | ||
compress | ||
verb 3 | ||
route {{ streisand_ipv4_address }} 255.255.255.255 net_gateway | ||
|
||
#route {{ streisand_ipv4_address }} 255.255.255.255 net_gateway | ||
|
||
<ca> | ||
{{ openvpn_ca_contents.stdout }} | ||
|
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" %} |
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" %} |
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" %} |
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can't use |
||
push "dhcp-option DNS6 {{ dnsmasq_openvpn_tcp_ipv6 }}" | ||
{% endif %} | ||
|
||
port {{ openvpn_port }} | ||
{% include "etc_openvpn_server_common.j2" %} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,10 @@ dh none | |
ifconfig-pool-persist ipp.txt | ||
push "redirect-gateway def1" | ||
|
||
{% if streisand_ipv6_address is defined %} | ||
push "route-ipv6 ::/0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a side note, do we want to push IPv6 routes to people all the time anyway, to avoid IPv6 leaks? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, we definitely should. It's being done for WireGuard as is so others should follow suite |
||
{% endif %} | ||
|
||
# Fix for the Windows 10 DNS leak described here: | ||
# https://community.openvpn.net/openvpn/ticket/605 | ||
push block-outside-dns | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would using
ipaddr
, make life easier here?{{ ocserv_ipv6_network | ipaddr('prefix') }}