Hey everyone!
I'm having trouble getting a wg interface on my NetBSD to work.
So, I think I set everything up according to this Mail:
https://mail-index.netbsd.org/current-users/2020/08/20/msg039393.html
Compiled a -CURRENT kernel (NetBSD myx.crabdance.com 9.99.93 NetBSD 9.99.93 (MYX) #1: Thu Dec 30 10:33:30 UTC 2021 sysbuild@myx.crabdance.com:/usr/src/sys/arch/amd64/compile/MYX amd64
) including the wg pseudo-device.
Then I set up the device like this, trying to get a tunnel up to a linux wireguard box:
ifconfig wg0 create
ifconfig wg0 inet 192.168.0.102 netmask 255.255.255.0
ifconfig wg0 inet6 fdeb:4a6:eeb6:1::102 prefixlen 64
ifconfig wg0 up
wgconfig wg0 set private-key /root/wgkey
wgconfig wg0 set listen-port 45340
wgconfig wg0 add peer linuxpeer ajvowg1234567890123456789012345678901234567= --allowed-ips=192.168.0.1/32,fdeb:4a6:eeb6:1::100/128 --endpoint=1.2.3.4:45340
Now I have my device like this:
# ifconfig wg0
wg0: flags=0x8041<UP,RUNNING,MULTICAST> mtu 1420
status: active
inet6 fe80::c838:34f1:ff28:f96d%wg0/64 flags 0 scopeid 0x6
inet6 fdeb:4a6:eeb6:1::102/64 flags 0
inet 192.168.0.102/24 flags 0
# wgconfig wg0
interface: wg0
private-key: (hidden)
listen-port: 45340
peer: linuxpeer
public-key: ajvowg1234567890123456789012345678901234567=
endpoint: 1.2.3.4:45340
preshared-key: (hidden)
allowed-ips: 192.168.0.1/32,fdeb:4a6:eeb6:1::100/128
latest-handshake: (never)
# route -n show
Routing tables
Internet:
Destination Gateway Flags Refs Use Mtu Interface
...
192.168.0/24 192.168.0.102 U - - - wg0
192.168.0.102 wg0 UHl - - - wg0
but I can ping neither the remote (just lists packet loss) nor myself:
# ping -c 4 -v 192.168.0.102
PING 192.168.0.102 (192.168.0.102): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
tcpdump show echo requests on wg0, but nothing else.
Did anyone get wg running? Am I missing something? Shouldn't pinging the local address work at least? I'm kinda out of ideas 😃
Appreciate any pointers, I can't find further documentation either.