Last active
September 28, 2023 00:42
-
-
Save mwt/59458cd46a114cc07adc0c5de7525f7d to your computer and use it in GitHub Desktop.
Update HOSTS file on my wireguard setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sed -i '/# BEGIN Wireguard vLAN #/,/# END Wireguard vLAN #/d' /etc/hosts | |
cat << EOF >> /etc/hosts | |
# BEGIN Wireguard vLAN # | |
10.7.0.1 letbox.wg | |
10.7.0.2 bellerophon.wg | |
10.7.0.3 specialk.wg | |
10.7.0.4 candy.wg | |
10.7.0.5 pixel7.wg | |
10.7.0.6 augustus.wg | |
10.7.0.7 kn-macbookpro.wg | |
10.7.0.8 meg-xps.wg | |
10.7.0.9 marsktop.wg | |
10.7.0.10 mwt-xps.wg | |
10.7.1.1 hosthatch.wg | |
fddd:2c4:0:1:: letbox.wg | |
fddd:2c4:0:2:: bellerophon.wg | |
fddd:2c4:0:3:: specialk.wg | |
fddd:2c4:0:4:: candy.wg | |
fddd:2c4:0:5:: pixel7.wg | |
fddd:2c4:0:6:: augustus.wg | |
fddd:2c4:0:7:: kn-macbookpro.wg | |
fddd:2c4:0:8:: meg-xps.wg | |
fddd:2c4:0:9:: marsktop.wg | |
fddd:2c4:0:10:: mwt-xps.wg | |
fddd:2c4:1:1:: hosthatch.wg | |
# END Wireguard vLAN # | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apply this with:
curl https://gist.githubusercontent.com/mwt/59458cd46a114cc07adc0c5de7525f7d/raw/wg-hosts.sh | sudo -s