ich plage mich hier seit einer Stunde mit debian 10.10, recht frisch installiert damit herum, wireguard soll auf debian als Server laufen:
Code: Alles auswählen
root@deb10:~# ifup wg0
ifup: unknown interface wg0
root@deb10:~#
Überall der gleiche Fehler: unknown interface. Warum? Auf einem raspi mit debian 10.9 gehts einwandfrei.
Code: Alles auswählen
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.
Auf Raspi;:
Code: Alles auswählen
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: [...]
Die keys kommen aus dem Web, von einer Anleitung. Also keine Sorge: meine sind das nicht.
Alles nach Anleitung! Debian 10.10 streikt und will das dasd wg0 nicht kennen! Warum?
Danke schon mal
Eckard
@habe vermutlich Fehler selbst gefunden: habe die eth0 und eth0:1 in /etc/network/interfaces eingetragen. Dann werden die Interfaces in /etc/network/interfaces.d/ ignoriert, richtig?