-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of IPv6 support #151
base: develop
Are you sure you want to change the base?
Changes from 7 commits
c31a28c
734f8eb
80b722a
88e7bb1
30bf129
1fc9a77
0e51e63
c1cbc8c
9ec969d
9995f24
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 |
---|---|---|
|
@@ -8,3 +8,12 @@ | |
state: present | ||
reload: true | ||
when: not lookup('env', 'IN_MOLECULE') | d(true, true) | bool | ||
|
||
- name: Set IPv6 forwarding in the sysctl file and reload if necessary | ||
sysctl: | ||
name: net.ipv6.conf.all.forwarding | ||
value: '1' | ||
sysctl_set: true | ||
state: present | ||
reload: true | ||
when: not lookup('env', 'IN_MOLECULE') | d(true, true) | bool and openvpn_ipv6_server is defined | ||
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. Could you break this when into a list? 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. Done in c1cbc8c |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
{% if openvpn_local is defined -%} | ||
local {{ openvpn_local }} | ||
{% else -%} | ||
;local a.b.c.d {% endif %} | ||
;local a.b.c.d | ||
{% endif %} | ||
|
||
# Which TCP/UDP port should OpenVPN listen on? If you want to run multiple | ||
# OpenVPN instances on the same machine, use a different port number for each | ||
|
@@ -14,6 +15,10 @@ port {{ openvpn_port }} | |
# TCP or UDP server? | ||
proto {{ openvpn_proto }} | ||
|
||
{% if openvpn_ipv6_enabled %} | ||
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. Add 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. Done in c1cbc8c |
||
proto {{ openvpn_proto }}6 | ||
{% endif %} | ||
|
||
{% if openvpn_portshare is defined %} | ||
# Port sharing | ||
port-share 127.0.0.1 {{ openvpn_portshare }} | ||
|
@@ -31,6 +36,9 @@ cipher {{ openvpn_cipher }} | |
# most systems, the VPN will not function unless you partially or fully disable | ||
# the firewall for the TUN/TAP interface. | ||
dev {{ openvpn_dev }} | ||
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. Why do you leave the non-ipv6 options outside of a conditional? Does this work? 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. Yes, this works |
||
{% if openvpn_ipv6_enabled %} | ||
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. Add 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. Done in c1cbc8c |
||
dev {{ openvpn_dev }}-ipv6 | ||
{% endif %} | ||
|
||
# SSL/TLS root certificate (ca), certificate (cert), and private key (key). | ||
# Each client and the server must have their own cert and key file. The server | ||
|
@@ -73,6 +81,11 @@ topology {{ openvpn_topology }} | |
# 10.8.0.1. Comment this line out if you are ethernet bridging. See the man | ||
# page for more info. | ||
server {{ openvpn_server }} | ||
{% if openvpn_ipv6_enabled and openvpn_ipv6_server is defined %} | ||
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. add 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. Done in c1cbc8c |
||
server-ipv6 {{ openvpn_ipv6_server }} | ||
ifconfig-ipv6 {{ openvpn_ipv6_ifconfig }} | ||
push "route-ipv6-default {{ openvpn_ipv6_route_default }}" | ||
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 couldn't find an option named Also, why do you need lines 86-87 unconditionally when ipv6 is used? 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.
According to the OpenVPN wiki
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. Done in c1cbc8c |
||
{% endif %} | ||
{% endif %} | ||
{% if openvpn_bridge %} | ||
# Configure server mode for ethernet bridging. | ||
|
@@ -190,3 +203,7 @@ push "dhcp-option DNS {{ dns }}" | |
{% for push_route in openvpn_route_ranges %} | ||
push "route {{ push_route }}" | ||
{% endfor %} | ||
|
||
{% for push_route_ipv6 in openvpn_ipv6_route_ranges %} | ||
push "route-ipv6 {{ push_route_ipv6 }}" | ||
{% endfor %} |
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.
Could you also rename the previous task to say
IPv4
?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.
Done in c1cbc8c