wg0-client.conf Wireguard script fails with Ubuntu 16.10 *client* #557
Comments
Documentation on
If you've got something explicitly directing your nameservers to localhost for use with dnsmasq, then indeed this is your problem. |
Thanks for that. Evidently my manpage for resolvconf (8) is obsolete... |
Nope. It wasn't obsolete. There are 2 packages in Ubuntu providing resolvconf. The one you want is |
@EggieCode @cryptofuture - I don't know how to analyze this discovery. In your opinion, should the Ubuntu WireGuard package explicitly depend on |
Most time you don't need to use resolvconf or openresolv with wireguard at all. |
I just experimented a bit with @cryptofuture ? Do you mean the config state of my wg0-client.conf script? It's what is supplied by Streisand as the config for a remote client. (It contains keys, and endpoint IP numbers, so I'm not going to post it publicly...) What other details do you want? |
Sounds like uninformed FUD. The reason you're having issues is that you haven't configured it properly for use with dnsmasq. |
@zx2c4? Can we please try to remain civil? I'm 100% certain that I want to try your code. I admit to struggling a bit. Your advice on checking my dnsmasq configuration will be followed when I have a chance. As far as I can tell, Streisand aspires to making all of its config straightforward. I am simply reporting my struggles with config as I go along. Please don't alienate your testers. |
Fair enough. I assume if you're using dnsmasq, then you want your /etc/resolv.conf to always say |
Found it |
I found the problem. Basically wg* interfaces not in the resolvconf scope. While resolvconf package used commonly in Debian/Ubuntu. :/etc/resolvconf/interface-order
# interface-order(5)
lo.inet6
lo.inet
lo.@(dnsmasq|pdnsd)
lo.!(pdns|pdns-recursor)
lo
+wg*
tun*
tap*
hso*
em+([0-9])?(_+([0-9]))*
p+([0-9])p+([0-9])?(_+([0-9]))*
@(br|eth)*([^.]).inet6
@(br|eth)*([^.]).ip6.@(dhclient|dhcpcd|pump|udhcpc)
@(br|eth)*([^.]).inet
@(br|eth)*([^.]).@(dhclient|dhcpcd|pump|udhcpc)
@(br|eth)*
@(ath|wifi|wlan)*([^.]).inet6
@(ath|wifi|wlan)*([^.]).ip6.@(dhclient|dhcpcd|pump|udhcpc)
@(ath|wifi|wlan)*([^.]).inet
@(ath|wifi|wlan)*([^.]).@(dhclient|dhcpcd|pump|udhcpc)
@(ath|wifi|wlan)*
ppp*
* Helps. Note: Sure its possible to edit interface-order in PPA, but such things surely prohibited in Debian upstream policy. And as for package we not providing any sample configs right now, and even what we removed was with resolvconf line commented. So, it may be enough just to add note to quick start on wireguard website. |
@cryptofuture I agree this seems like something worth pursuing with upstream of your resolvconf package. Have you opened a bug with them? |
@cryptofuture Debian's resolvconf is limited and bad. What people actually want is openresolv, which "provides" resolvconf. So, just make the Ubuntu package depend on openresolv, and it should transparently replace resolvconf. |
k, I'll change to openresolv for now. |
This appears to have been fixed with EggieCode/wireguard-ppa#12 . I believe you can now close this ticket, unless @fghorow wants to confirm. |
A newly re-installed Ubuntu 16.04 Streisand server supplies a wg0-client.conf file for wireguard that fails under an Ubuntu 16.10 client.
The line:
PostUp = echo nameserver 10.192.122.1 | resolvconf -a %i -m 0 -x
adds a file /run/resolvconf/interfaces/wg0-client (N.B. no '.wg-quick' or somesuch postfix as suggested by resolvconf doco) containing the appropriate nameserver line. However, the info in that file is not propagated into /run/resolvconf/resolv.conf (which, in turn, is symlinked to by the traditional /etc/resolv.conf file).
Additionally, when the interface wg0-client is showing in
ifconfig
with address 10.192.122.2, pinging 10.192.122.1 fails withDestination Host Unreachable
. The routing table shows nothing related to the 10.192.122.0/24 subnet.Now, my setup is admittedly a little off (I'm running dnsmasq on my Ubuntu 16.10 box), but I'm unsure if that has anything to do with the problems above.
Also, the
-m 0 -x
options toresolvconf
are not documented in any of the manpage, the resolvconf script itself, or the Ubuntu README file, as far as I can tell. Where the heck is the doco for those options???Any hints on configuration would be greatly appreciated!
The text was updated successfully, but these errors were encountered: