Date: Sun, 23 Feb 2020 07:03:53 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 244330] net/wireguard wg-quick remote IP address assignment is incorrect Message-ID: <bug-244330-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D244330 Bug ID: 244330 Summary: net/wireguard wg-quick remote IP address assignment is incorrect Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: decke@FreeBSD.org Reporter: peter@libassi.se Flags: maintainer-feedback?(decke@FreeBSD.org) Assignee: decke@FreeBSD.org local wg interface does not respond due to the wg-quick script sets up the interface by reusing the local address as the remote address in the ifconfig command: root@bsd2:~ # wg-quick up wg0 [#] wireguard-go wg0 INFO: (wg0) 2020/02/20 09:45:16 Starting wireguard-go version 0.0.20200121 [#] wg setconf wg0 /tmp/tmp.87viEAsK/sh-np.YdRfI6 [#] ifconfig wg0 inet 192.168.2.2 192.168.2.2 alias On linux setting up an IP address on a tun interface does not require a rem= ote address: [root@vpn2 wireguard]# wg-quick up wg0 [#] ip link add wg0 type wireguard [#] wg setconf wg0 /dev/fd/63 [#] ip -4 address add 192.168.2.2/24 dev wg0 In the wg-quick script function add_addr() is where the assignment is made: cmd ifconfig "$INTERFACE" inet "$1" "${1%%/*}" alias I verifed this by replacing remote address with localhost: cmd ifconfig "$INTERFACE" inet "$1" "127.0.0.1" alias Now local ping works. You can give any address I suppose since the =E2=80= =9Dremote address=E2=80=9D of the ifconfig of a tun interface is not really used by w= ireguard. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244330-7788>