Update 'set_gateway.sh'
Removed static host value and change it to set from the endpoint variable of wireguard config actualy
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
ENDPOINT=$(cat /etc/wireguard/wg0.conf | grep Endpoint | awk '{print $3}' |cut -d ':' -f1)
|
||||
IP_GATEWAY=$(route -n | grep 'UG[ \t]' | awk '{print $2}');
|
||||
route add -host vps.vizpartingatlan.hu gw $IP_GATEWAY
|
||||
route add -host $ENDPOINT gw $IP_GATEWAY
|
||||
|
Reference in New Issue
Block a user