WG interface to ipv4

ѽ҉ᶬḳ℠ vtol at gmx.net
Fri May 4 11:27:39 CEST 2018


Thanks Jason. Perhaps I should have pointed out initially that ipv6 is 
disabled on the server via kernel as in sysctl.conf (see below) and thus 
would not expect a WG socket on ipv6, however it is still there.

netstat -uapnw
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         
State       PID/Program name
udp        0      0 0.0.0.0:45065 0.0.0.0:*                           -
udp6       0      0 :::45065 :::*                                -

And why displaying wildcard ip (0.0.0.0) as opposed to its iface 
configuration:

---/etc/network/interfaces

auto lo wg0 eth0
iface wg0 inet static
     address 172.23.0.1
     netmask 255.255.255.0
     broadcast 172.23.0.255
     network 172.23.0.0
     pre-up ip link add wg0 type wireguard
     pre-up wg setconf wg0 /etc/wireguard/wg0.conf
     up ip link set wg0 up
     post-up sysctl -w net.ipv4.ip_forward=1
     down ip link set wg0 down
     post-down sysctl -w net.ipv4.ip_forward=0
     post-down ip link delete wg0

---- sysctl.conf

# Disable IPv6 unless required
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.wg0.disable_ipv6 = 1
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.lo.autoconf = 0
net.ipv6.conf.eth0.autoconf = 0
net.ipv6.conf.wg0.autoconf = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 0
net.ipv6.conf.wg0.use_tempaddr = 0

# Do not accept router advertisements
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.eth0.accept_ra = 0
net.ipv6.conf.wg0.accept_ra = 0
net.ipv6.conf.default.accept_dad = 0
net.ipv6.conf.all.accept_dad = 0
net.ipv6.conf.eth0.accept_dad = 0
net.ipv6.conf.wg0.accept_dad = 0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4174 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20180504/636cd706/attachment.p7s>


More information about the WireGuard mailing list