https://www.ovpn.com/en/guides/wireguard/ubuntu-wg-cli empfahl mir:
sudo -i
echo "[Interface]
PrivateKey = Private-Zeichenfolge=
Address = 172.x.x.x/32, fd00:xxxx:xxxx:cafe:xxxx:xxxx:xxxx:xxxx/128
DNS = 46.227.67.134, 192.165.9.158
[Peer]
PublicKey = Public-Zeichenfolge=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = vpn44.prd.vienna.ovpn.com:9929
" >> /etc/wireguard/vpn44-at-vie.conf
Das hat nicht geklappt, vermutlich wegen ">>" und nicht vorhandener Datei, also habe ich die vim erstellt und erhielt darauf folgende Fehlermeldung:
root@pc:/etc/wireguard# wg-quick up vpn44-at-vie
[#] ip link add vpn44-at-vie type wireguard
[#] wg setconf vpn44-at-vie /dev/fd/63
[#] ip -4 address add 172.x.x.x/32 dev vpn44-at-vie
[#] ip -6 address add fd00:xxxx:xxxx:cafe:xxxx:xxxx:xxxx:xxxx/128 dev vpn44-at-vie
[#] ip link set mtu 1420 up dev vpn44-at-vie
[#] resolvconf -a vpn44-at-vie -m 0 -x
/usr/bin/wg-quick: line 32: resolvconf: command not found
[#] ip link delete dev vpn44-at-vie
Darauf habe ich folgendes probiert:
ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf
"wg-quick down" hat nicht funktioniert, vermutlich weil gar nicht "up". Also "up" probiert.
root@sv:/etc/wireguard# wg-quick up vpn44-at-vie.conf
[#] ip link add vpn44-at-vie type wireguard
[#] wg setconf vpn44-at-vie /dev/fd/63
[#] ip -4 address add 172.x.x.x/32 dev vpn44-at-vie
[#] ip -6 address add fd00:xxxx:xxxx:cafe:xxxx:xxxx:xxxx:xxxx/128 dev vpn44-at-vie
[#] ip link set mtu 1420 up dev vpn44-at-vie
[#] resolvconf -a vpn44-at-vie -m 0 -x
[#] wg set vpn44-at-vie fwmark 51820
[#] ip -6 route add ::/0 dev vpn44-at-vie table 51820
[#] ip -6 rule add not fwmark 51820 table 51820
[#] ip -6 rule add table main suppress_prefixlength 0
[#] ip6tables-restore -n
[#] ip -4 route add 0.0.0.0/0 dev vpn44-at-vie table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] iptables-restore -n
Und nun frage ich mich, wie ich prüfe, ob alles passt.
Edit: Vielleicht reicht schon eine Prüfung mit "ifconfig -a". Da sehe ich "vpn44-at-vie". "wg-quick down vpn44-at-vie.conf" funktioniert jetzt.
Wenn keine Einwände kommen, dann setze ich auf gelöst, scheint zu passen.
Moderiert von sebix:
An bestehenden Thread angehängt. Bitte erstelle keine Doppelpostings.