Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

wireguard 1.0.20210223: ifup: "unknown interface wg0".

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
egerlach
Posts: 2
Joined: 2021-11-24 19:50

wireguard 1.0.20210223: ifup: "unknown interface wg0".

#1 Post by egerlach »

Hello,
I just installed wireguard on Debian 10.10. wg0 won't come up!!

Code: Select all

root@deb10:~# ifup wg0
ifup: unknown interface wg0
root@deb10:~#
Has wireguard 1.0.20210223 a bug? Can somebody here help me to install older version than 1.0.20210223?

I used instruction: https://gist.github.com/kalaspuffar/128 ... a54ab6683c

wireguard on raspberry with debian 10.9 works fine, same config files. Debian on amd64:

Code: Select all

root@deb10:~# cat  /etc/wireguard/wg0.conf 
# define the WireGuard service
# define the WireGuard service
[Interface]
# contents of file wg-private.key that was recently created
PrivateKey = hlKy6azGCB0uVbCdkW8Htx23k57iWzOFJRLAYHTx5wU=

# UDP service port; 51820 is a common choice for WireGuard
ListenPort = 51820

[Peer]
PublicKey = 2GIURzIDBgI1Y+1Ei+i2C5kEOR53mH172MaidaVpD3M=


root@deb10:~# cat  /etc/network/interfaces.d/wg0
# indicate that wg0 should be created when the system boots, and on ifup -a
auto wg0

# describe wg0 as an IPv4 interface with static address
iface wg0 inet static

        # static IP address
        address 10.0.2.1/24

        # before ifup, create the device with this ip link command
        pre-up ip link add $IFACE type wireguard

        # before ifup, set the WireGuard config from earlier
        pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf

        # after ifdown, destroy the wg0 interface
        post-down ip link del $IFACE

root@deb10:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.104  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::215:5dff:fe80:5904  prefixlen 64  scopeid 0x20<link>
        inet6 2a02:810b:4c0:32fc:215:5dff:fe80:5904  prefixlen 64  scopeid 0x0<global>
        ether 00:15:5d:80:59:04  txqueuelen 1000  (Ethernet)
        RX packets 1792481  bytes 611954758 (583.6 MiB)
        RX errors 0  dropped 304748  overruns 0  frame 0
        TX packets 764121  bytes 104130397 (99.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.102  netmask 255.255.255.0  broadcast 10.0.0.255
        ether 00:15:5d:80:59:04  txqueuelen 1000  (Ethernet)

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Lokale Schleife)
        RX packets 540525  bytes 111292318 (106.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 540525  bytes 111292318 (106.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


root@deb10:~# dpkg -l | grep wiregu
ii  wireguard                             1.0.20210223-1~bpo10+1                  all          fast, modern, secure kernel VPN tunnel (metapackage)
ii  wireguard-dkms                        1.0.20210219-1~bpo10+1                  all          fast, modern, secure kernel VPN tunnel (DKMS version)
ii  wireguard-tools                       1.0.20210223-1~bpo10+1                  amd64        fast, modern, secure kernel VPN tunnel (userland utilities)
Dieses dkms wird automatisch bei apt install wireguard installiert. 

on raspi works, both config files are identical. But raspi got older version of wireguard, that old version works:

Code: Select all

pi@raspberrypi:~ $ sudo su -
root@raspberrypi:~# dpkg -l | grep wireg
ii  wireguard                            1.0.20200827-1~bpo10+1                  all          fast, modern, secure kernel VPN tunnel (metapackage)
ii  wireguard-tools                      1.0.20200827-1~bpo10+1                  armhf        fast, modern, secure kernel VPN tunnel (userland utilities)

root@raspberrypi:~# ifconfig
[...]
wg0: flags=209<UP,POINTOPOINT,RUNNING,NOARP>  mtu 1420
        inet 10.0.2.1  netmask 255.255.255.0  destination 10.0.2.1
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 18  dropped 0 overruns 0  carrier 0  collisions 0
wlan0: [...]
Who can help to get wg0 up?
tia
Eckard


@perhaps found error: I inserted eth0 aund eth0:1 in /etc/network/interfaces. Then other interfaxes in /etc/network/interfaces.d/ are ignored, right? - I inserted wg0 into /etc/network/interfaces , now ifup and and ifdown works.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: wireguard 1.0.20210223: ifup: "unknown interface wg0".

#2 Post by bw123 »

Has wireguard 1.0.20210223 a bug?
You can always check, by adding package name to https://bugs.debian.org/ like so:
https://bugs.debian.org/wireguard
Can somebody here help me to install older version than 1.0.20210223?
That's the oldest ver in the repo:
https://packages.debian.org/wireguard
@perhaps found error: I inserted eth0 aund eth0:1 in /etc/network/interfaces. Then other interfaxes in /etc/network/interfaces.d/ are ignored, right?
No, that doesn't sound right that one file takes precedence over others. Maybe your /etc/network/interfaces does not source in the files? Check for something like this at the beginning:

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*
Looks like the problem was solved? You might edit the title so it will help others looking for similar issue.
Thanks
resigned by AI ChatGPT

Post Reply