История изменений
Исправление vainkop1, (текущая версия) :
Отвечаю на свой вопрос, возможно кому-то пригодится:
$ cat wg0.conf
[Peer]
PublicKey = SERVER_PUBLIC_KEY_HERE
Endpoint = SERVER_IP_HERE:51820
AllowedIPs = 0.0.0.0/0
[Interface]
PrivateKey = CLIENT_PRIVATE_KEY_HERE
Address = 10.8.0.2/32
Table=off
+
$ dig +short ifconfig.co
104.21.192.29
104.21.192.28
+
$ wg-quick up wg0
$ ip -4 route add 104.21.192.28/32 dev wg0
$ ip -4 route add 104.21.192.29/32 dev wg0
=
$ curl ifconfig.co
1.2.3.4 - внешний адрес vpn сервера!
$ curl -s https://api.myip.com | jq -r .ip
5.6.7.8 - внешний адрес локальной машины !
:)
Исправление vainkop1, :
Отвечаю на свой вопрос, возможно кому-то пригодится:
$ cat wg0.conf
[Peer]
PublicKey = SERVER_PUBLIC_KEY_HERE
Endpoint = SERVER_IP_HERE:51820
AllowedIPs = 0.0.0.0/0
[Interface]
PrivateKey = CLIENT_PRIVATE_KEY_HERE
Address = 10.8.0.2/32
Table=off
$ dig +short ifconfig.co
104.21.192.29
104.21.192.28
$ wg-quick up wg0
$ ip -4 route add 104.21.192.28/32 dev wg0
$ ip -4 route add 104.21.192.29/32 dev wg0
=
$ curl ifconfig.co
1.2.3.4 - внешний адрес vpn сервера!
$ curl -s https://api.myip.com | jq -r .ip
5.6.7.8 - внешний адрес локальной машины !
:)
Исходная версия vainkop1, :
Отвечаю на свой вопрос, возможно кому-то пригодится:
$ cat wg0.conf
[Peer]
PublicKey = SERVER_PUBLIC_KEY_HERE
Endpoint = SERVER_IP_HERE:51820
AllowedIPs = 0.0.0.0/0
[Interface]
PrivateKey = CLIENT_PRIVATE_KEY_HERE
Address = 10.8.0.2/32
Table=off
$ dig +short ifconfig.co
104.21.192.29
104.21.192.28
$ wg-quick up wg0
$ ip -4 route add 104.21.192.28/32 dev wg0
$ ip -4 route add 104.21.192.29/32 dev wg0
=
$ curl ifconfig.co
1.2.3.4 - external ip of the vpn server!
$ curl -s https://api.myip.com | jq -r .ip
5.6.7.8 - external ip of the local machine !
:)