Skip to content
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

Provide limited support for v6 #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ openvpn_port: 1194
openvpn_proto: udp
openvpn_dev: tun
openvpn_server: 10.8.0.0 255.255.255.0
# Should be a network address with CIDR, example:
# openvpn_server_v6: fc00:0:abc:def::/64
openvpn_max_clients: 100
openvpn_log: /var/log/openvpn.log # Log's directory
openvpn_keepalive: "10 120"
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ openvpn_port: 1194
openvpn_proto: udp
openvpn_dev: tun
openvpn_server: 10.8.0.0 255.255.255.0 # Set empty for skip
# Should be a network address with CIDR, example:
# openvpn_server_v6: fc00:0:abc:def::/64
openvpn_bridge: {}
openvpn_max_clients: 100
openvpn_log: /var/log/openvpn.log # Log's directory
Expand Down
6 changes: 4 additions & 2 deletions templates/server.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ client-config-dir {{ openvpn_client_config_dir }}
topology {{ openvpn_topology }}
{% endif %}

{% if openvpn_server and not openvpn_bridge %}
{% if ( openvpn_server or openvpn_server_v6 ) and not openvpn_bridge %}
# Configure server mode and supply a VPN subnet for OpenVPN to draw client
# addresses from. The server will take 10.8.0.1 for itself, the rest will be
# made available to clients. Each client will be able to reach the server on
# 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_server %}server {{ openvpn_server }}{% endif %}

{% if openvpn_server_v6 %}server-ipv6 {{ openvpn_server_v6 }}{% endif %}
{% endif %}
{% if openvpn_bridge %}
# Configure server mode for ethernet bridging.
Expand Down