1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-11-05 17:02:26 +08:00
NeoNetwork/vpn/wg-postup.sh
2023-05-02 23:44:44 +08:00

13 lines
221 B
Bash
Executable file

#!/usr/bin/env bash
IF="$1"
LOCAL_IP="$2"
PEER_IP="$3"
LOCAL_IPV6="$4"
PEER_IPV6="$5"
ip addr add "$LOCAL_IP" peer "$PEER_IP" dev "$IF"
if [ "$#" -ge 5 ]; then
ip addr add "$LOCAL_IPV6" peer "$PEER_IPV6" dev "$IF"
fi