Wireguard einrichten: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
KKeine Bearbeitungszusammenfassung |
|||
| Zeile 19: | Zeile 19: | ||
<syntaxhighlight lang="bash" line="1"> | <syntaxhighlight lang="bash" line="1"> | ||
[Interface] | [Interface] | ||
Address = 10.0. | PrivateKey = | ||
Address = 10.0.0.6/32 | |||
DNS = 192.168.1.14,1.1.1.1,8.8.8.8 | |||
[Peer] | |||
PublicKey = | |||
Endpoint = xsarts.de:51820 | |||
AllowedIPs = 192.168.1.0/24 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Zeile 40: | Zeile 34: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
wg-quick up wg0 | wg-quick up wg0 | ||
====Client==== | |||
=====in OPNSense erzeugt===== | |||
apt install wireguard -y | |||
Inhalt aus Peer-Generator hier einfügen nano /etc/wireguard/wg0.conf | |||
====OPNSense als Client==== | ====OPNSense als Client==== | ||
Instanz erzeugen | Instanz erzeugen | ||
Version vom 3. Juni 2025, 23:16 Uhr
Beschreibung
Download
Installation
apt install wireguard -y
Konfiguration
Server
Keys erzeugen
wg genkey | sudo tee /etc/wireguard/priv.key
chmod go= /etc/wireguard/priv.key
cat /etc/wireguard/priv.key | wg pubkey | sudo tee >> /etc/wireguard/pub.key
nano /etc/wireguard/wg0.confInhalt:
[Interface]
PrivateKey =
Address = 10.0.0.6/32
DNS = 192.168.1.14,1.1.1.1,8.8.8.8
[Peer]
PublicKey =
Endpoint = xsarts.de:51820
AllowedIPs = 192.168.1.0/24echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf && sysctl -p && sysctl -w net.ipv4.ip_forward=1wg-quick up wg0
Client
in OPNSense erzeugt
apt install wireguard -y
Inhalt aus Peer-Generator hier einfügen nano /etc/wireguard/wg0.conf
OPNSense als Client
Instanz erzeugen Peer erzeugen
Update
Test
Fehlerbehebung
Starten/Stoppen funktioniert nicht
Lösung 1
auszufüllen