All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: ds@fastmail.fm
Cc: wireguard@lists.zx2c4.com
Subject: Re: disabling ipv6 with wg-quick
Date: Thu, 16 Nov 2017 12:22:22 +0100	[thread overview]
Message-ID: <20171116112222.GA22221@kroah.com> (raw)
In-Reply-To: <1510826689.1349863.1174432192.27EE87E6@webmail.messagingengine.com>

On Thu, Nov 16, 2017 at 11:04:49AM +0100, ds@fastmail.fm wrote:
> Hi,
> 
> Is there a way to disable ipv6 when using wg-quick?
> 
> If I have the following line on my conf file:
> 
> Address = xx.xx.x.39/32,xxxx:xxxx:xxx:bb01::327/128
> 
> wg-quick will fail with the following error:
> 
>  ~ 2   wg-quick up mullvad-se2    
> [#] ip link add mullvad-se2 type wireguard
> [#] wg setconf mullvad-se2 /dev/fd/63
> [#] ip address add  xx.xx.x.39/3 dev mullvad-se2
> [#] ip address add xxxx:xxxx:xxx:bb01::327/128 dev mullvad-se2
> RTNETLINK answers: Permission denied
> 
> I have ip6 disabled in my system.
> 
> Removing xxxx:xxxx:xxx:bb01::327/128 works, but wg-quick still sets ups
> some ipv6 routes `ip -6 ..` etc.
> 
> Is there a way to use ipv4 only with wg-quick?

I placed the following in the [Interface] section of the configuration
file to achieve this:
	PreUp = sysctl net.ipv6.conf.all.disable_ipv6=1
	PostDown = sysctl net.ipv6.conf.all.disable_ipv6=0

It's a horrid hack, but does seem to work.

hope this helps,

greg k-h

  reply	other threads:[~2017-11-16 11:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-16 10:04 disabling ipv6 with wg-quick ds
2017-11-16 11:22 ` Greg KH [this message]
2017-11-16 12:28 ` Jason A. Donenfeld
2017-11-16 20:31   ` Request: Optional "Comment" [Peer] entry Lonnie Abelbeck
2017-11-17  8:20     ` Manuel Schölling
2017-11-17  8:29       ` Matthias Urlichs
2017-11-17  9:20     ` Jason A. Donenfeld
2017-11-17 13:07       ` Antonio Quartulli
2017-11-20 10:58   ` disabling ipv6 with wg-quick ds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171116112222.GA22221@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ds@fastmail.fm \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.