nach der Anleitung dieser Webseite wurde ein Wireguard-Server installiert: https://www.wundertech.net/setup-wiregu ... -tutorial/
Die Einrichtung funktionierte weitestgehend fehlerfrei.
Ein Client kann erfolgreich eine Verbindung zum Wireguard-Server herstellen.
Was nicht funktioniert, ist der Zugriff auf Internet-Adressen.
Domänen werden korrekt auf die entsprechende IP-Adresse aufgelöst, z.B.
Code: Alles auswählen
$ Ping google.de
PING google.de (142.250.203.131) 56(84) bytes of data.
Was hingegen funktioniert, sind Pings auf den lokalen DNS-Server:
Code: Alles auswählen
ping dnsserver
PING dnsserver (192.168.188.19) 56(84) bytes of data.
64 bytes from 192.168.188.19 (192.168.188.19): icmp_seq=1 ttl=64 time=1.17 ms
64 bytes from 192.168.188.19 (192.168.188.19): icmp_seq=2 ttl=64 time=1.37 ms
64 bytes from 192.168.188.19 (192.168.188.19): icmp_seq=3 ttl=64 time=1.23 ms
64 bytes from 192.168.188.19 (192.168.188.19): icmp_seq=4 ttl=64 time=1.27 ms
Die Domain-Auflösung funktioniert immer fehlerfrei, solange die Domain existiert.
Hier ist die Konfiguration:
Code: Alles auswählen
[Interface]
PrivateKey = [...Private Key...]
Address = 10.6.0.1/24
MTU = 1460
ListenPort = 51820
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -o %i -j ACCEPT
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE iptables -D FORWARD -o %i -j ACCEPT
### begin Client1 ###
[Peer]
PublicKey = [ ... Key ...]
PresharedKey = [...Key...]
AllowedIPs = 10.6.0.2/32
### end Client1 ###