diff --git a/net/wg-installer/common/wg.sh b/net/wg-installer/common/wg.sh index b4f884dce..610c26bb7 100644 --- a/net/wg-installer/common/wg.sh +++ b/net/wg-installer/common/wg.sh @@ -29,7 +29,7 @@ check_wg_neighbors() { wg_interfaces=$(ip link | grep wg | awk '{print $2}' | sed 's/://') for phy in $wg_interfaces; do - linklocal=$(ip -6 a list dev $phy | grep "scope link" | awk '{print $2}' | sed 's/\/64//') 2>/dev/null + linklocal=$(ip -6 addr list dev $phy | grep "scope link" | awk '{print $2}' | sed 's/\/64//') 2>/dev/null ips=$(ping ff02::1%$phy -w5 -W5 -c10 | awk '/from/{print($4)}' | sed 's/.$//') 2>/dev/null delete=1 for ip in $ips; do diff --git a/net/wg-installer/wg-client/wg-client-installer.sh b/net/wg-installer/wg-client/wg-client-installer.sh index 28fdf6a85..b1bbdaeb3 100644 --- a/net/wg-installer/wg-client/wg-client-installer.sh +++ b/net/wg-installer/wg-client/wg-client-installer.sh @@ -86,8 +86,8 @@ register_client_interface () { ip link add dev $ifname type wireguard - ip -6 a a dev $ifname $client_ip - ip -6 a a dev $ifname fe80::2/64 + ip -6 addr add dev $ifname $client_ip + ip -6 addr add dev $ifname fe80::2/64 wg set $ifname listen-port $port private-key $privkey peer $pubkey allowed-ips 0.0.0.0/0,::0/0 endpoint "${endpoint}:${gw_port}" ip link set up dev $ifname ip link set mtu $mtu_client dev $ifname # configure mtu here! diff --git a/net/wg-installer/wg-server/lib/wg_functions.sh b/net/wg-installer/wg-server/lib/wg_functions.sh index 035e4e6f0..ec4aaa032 100644 --- a/net/wg-installer/wg-server/lib/wg_functions.sh +++ b/net/wg-installer/wg-server/lib/wg_functions.sh @@ -65,14 +65,14 @@ wg_register () { # create wg tunnel ip link add dev $ifname type wireguard wg set $ifname listen-port $port private-key $gw_key peer $public_key allowed-ips 0.0.0.0/0,::0/0 - ip -6 address add $gw_ip_assign dev $ifname - ip -6 address add fe80::1/64 dev $ifname + ip -6 addr add $gw_ip_assign dev $ifname + ip -6 addr add fe80::1/64 dev $ifname v4prefix=$(uci get wgserver.@server[0].base_v4prefix) if [ $? -eq 0 ]; then gw_ipv4=$(owipcalc $v4prefix add $offset next 32) # gateway ip gw_ipv4_assign="${gw_ipv4}/32" - ip address add $gw_ipv4_assign broadcast 255.255.255.255 dev $ifname + ip addr add $gw_ipv4_assign broadcast 255.255.255.255 dev $ifname fi ip link set up dev $ifname