Install WireGuard
WireGuard
#!/bin/bash
# Update and Upgrade
apt update && apt upgrade -y && apt full-upgrade -y
#WireGuard Installation
apt-get install -y resolvconf sudo wireguard
Zum autostarten mit wg-quick: "systemctl enable wg-quick@CONFIG"
Umbedingt im Service File eintragen: " Before=apache2.service mariadb.service redis-server.service ssh.service "
Eigentliche Datei liegt unter /var/run/resolvconf/resolv.conf
Inhalt:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.
nameserver 1.1.1.1
nameserver 1.0.0.1
options timeout:1 attempts:1 rotate
Wenn als intern.conf gespeichert:
nano /etc/wireguard/intern.conf && wg-quick up intern && systemctl enable wg-quick@intern
[email protected]
nano /lib/systemd/system/ssh.service