doc
This commit is contained in:
parent
4ba5105d4c
commit
b40264ecbe
2 changed files with 11 additions and 6 deletions
|
@ -2,11 +2,13 @@
|
|||
Setup a wireguard VPN to route traffic from a VPS to your local machine.
|
||||
Based from [this](https://github.com/mochman/Bypass_CGNAT) guide.
|
||||
|
||||
# Possible extra configuration
|
||||
### Usage
|
||||
|
||||
```
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
. . .
|
||||
dns-nameservers 1.1.1.1 9.9.9.9
|
||||
This creates a file `client.conf` in the current directory,
|
||||
and it will output the client configuration to the terminal as well.
|
||||
|
||||
```shell
|
||||
wget -qO /opt/bypasscgnat.sh "https://gitlab.com/tavo-wasd/guides/-/raw/main/self_hosting/bypass_cgnat/bypasscgnat.sh"
|
||||
chmod +x /opt/bypasscgnat.sh
|
||||
/opt/bypasscgnat.sh
|
||||
```
|
||||
|
|
|
@ -47,6 +47,8 @@ install_wireguard() {
|
|||
}
|
||||
|
||||
wireguard_config() {
|
||||
ufw allow 55107
|
||||
|
||||
printf "net.ipv6.conf.all.forwarding = 1\nnet.ipv4.ip_forward = 1" > /etc/sysctl.d/wg.conf
|
||||
sysctl -p
|
||||
sysctl --system
|
||||
|
@ -62,6 +64,7 @@ wireguard_config() {
|
|||
|
||||
install_wireguard
|
||||
wireguard_config
|
||||
ufw reload
|
||||
|
||||
echo "[Interface]
|
||||
PrivateKey = ${SERVER_PRV_KEY}
|
||||
|
|
Loading…
Reference in a new issue