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.
|
Setup a wireguard VPN to route traffic from a VPS to your local machine.
|
||||||
Based from [this](https://github.com/mochman/Bypass_CGNAT) guide.
|
Based from [this](https://github.com/mochman/Bypass_CGNAT) guide.
|
||||||
|
|
||||||
# Possible extra configuration
|
### Usage
|
||||||
|
|
||||||
```
|
This creates a file `client.conf` in the current directory,
|
||||||
auto eth0
|
and it will output the client configuration to the terminal as well.
|
||||||
iface eth0 inet static
|
|
||||||
. . .
|
```shell
|
||||||
dns-nameservers 1.1.1.1 9.9.9.9
|
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() {
|
wireguard_config() {
|
||||||
|
ufw allow 55107
|
||||||
|
|
||||||
printf "net.ipv6.conf.all.forwarding = 1\nnet.ipv4.ip_forward = 1" > /etc/sysctl.d/wg.conf
|
printf "net.ipv6.conf.all.forwarding = 1\nnet.ipv4.ip_forward = 1" > /etc/sysctl.d/wg.conf
|
||||||
sysctl -p
|
sysctl -p
|
||||||
sysctl --system
|
sysctl --system
|
||||||
|
@ -62,6 +64,7 @@ wireguard_config() {
|
||||||
|
|
||||||
install_wireguard
|
install_wireguard
|
||||||
wireguard_config
|
wireguard_config
|
||||||
|
ufw reload
|
||||||
|
|
||||||
echo "[Interface]
|
echo "[Interface]
|
||||||
PrivateKey = ${SERVER_PRV_KEY}
|
PrivateKey = ${SERVER_PRV_KEY}
|
||||||
|
|
Loading…
Reference in a new issue