The roles/wireguard/templates/client.conf.j2 was not working on Ubuntu 18.04 as a client. While this is not officially supported at this time, it would appear if you actually switch the spot in which the address shows up and the private key exists so that address is first and private key is next then the ubuntu client will accept it. For those that want to test it, the following will help you test on ubuntu 18.04 as a client: First setup Wireguard by using the PPA for wireguard and installing it. Next create the wg0 interface by using: sudo ip link add dev wg0 . Finally if you copy the <yourname>.conf for the wireguard client into /etc/wireguard/wg0.conf you can now perform a sudo wg-quick up wg0 and get full tunnel connectivity.

This commit is contained in:
Moses Frost 2018-08-09 07:07:44 -04:00
parent 53d1113881
commit 4aa1aa7bee
No known key found for this signature in database
GPG key ID: 725EF9C19E31C1FE

View file

@ -1,6 +1,6 @@
[Interface]
PrivateKey = {{ lookup('file', wireguard_config_path + '/private/' + item.1) }}
Address = {{ wireguard_network_ipv4['clients_range'] }}.{{ wireguard_network_ipv4['clients_start'] + item.0 + 1 }}/32{% if ipv6_support %},{{ wireguard_network_ipv6['clients_range'] }}{{ wireguard_network_ipv6['clients_start'] + item.0 + 1 }}/{{ wireguard_network_ipv6['prefix'] }}
PrivateKey = {{ lookup('file', wireguard_config_path + '/private/' + item.1) }}
{% endif %}
DNS = {{ wireguard_dns_servers }}