Update Remote-Access_Containers/wg-easy/README.md
This commit is contained in:
1 parent
85478be371
commit
37dbd73b6d
1 file changed
+46
-3
@@ -3,6 +3,49 @@ Source: https://github.com/wg-easy/wg-easy
|
||||
Change your DNS to your internal DNS server(like pihole) if needed \
|
||||
Add your public IP or if you have DDNS use that subdomain
|
||||
|
||||
Since running in host mode, need to add firewall rules: \
|
||||
sudo ufw allow 51821/tcp \
|
||||
sudo ufw allow 51820/udp
|
||||
If wanting wg-easy to access other docker containers and resolve DNS/use internal DNS server (like a pihole in a docker container), then I recommend a small Dietpi VM.
|
||||
|
||||
Steps or link to setting up Dietpi:
|
||||
|
||||
|
||||
### Configure Dietpi:
|
||||
1. SSH key pair
|
||||
https://dietpi.com/docs/software/ssh/#dropbear-restrict-root-logins
|
||||
|
||||
/boot/dietpi/func/dietpi-set_software disable_ssh_password_logins root
|
||||
|
||||
2. Firewall
|
||||
sudo apt install ufw
|
||||
sudo ufw default deny incoming
|
||||
sudo ufw default allow outgoing
|
||||
sudo ufw allow from 192.168.45.0/24 to any port 22 proto tcp
|
||||
sudo ufw enable
|
||||
|
||||
3. Unattended security updates
|
||||
sudo apt install unattended-upgrades apt-listchanges
|
||||
sudo dpkg-reconfigure --priority=low unattended-upgrades
|
||||
|
||||
sudo sed -i 's|//Unattended-Upgrade::Automatic-Reboot "false";|Unattended-Upgrade::Automatic-Reboot "true";|' /etc/apt/apt.conf.d/50unattended-upgrades
|
||||
sudo sed -i 's|//Unattended-Upgrade::Automatic-Reboot-Time "02:00";|Unattended-Upgrade::Automatic-Reboot-Time "05:00";|' /etc/apt/apt.conf.d/50unattended-upgrades
|
||||
|
||||
4. Time sync
|
||||
timedatectl
|
||||
sudo systemctl enable --now systemd-timesyncd
|
||||
|
||||
5. Fail2ban
|
||||
sudo apt install fail2ban
|
||||
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
|
||||
sudo nano /etc/fail2ban/jail.local
|
||||
|
||||
6. install docker
|
||||
sudo dietpi-software install 162
|
||||
|
||||
7. install dockhand
|
||||
sudo mkdir /srv/docker
|
||||
sudo chown -R root:docker /srv/docker
|
||||
sudo chmod -R 755 /srv/docker
|
||||
https://scripts.gabesville.com/Gabesville/Docker-Compose/src/branch/main/Docker_GUI_Managers/dockhand/README.md
|
||||
|
||||
8. run wireguard container
|
||||
|
||||
9. port forward
|
||||
Reference in new issue
Block a user