{"id":1682,"date":"2020-10-28T15:33:46","date_gmt":"2020-10-28T20:33:46","guid":{"rendered":"https:\/\/blog.iqonda.net\/?p=1682"},"modified":"2020-10-28T15:41:13","modified_gmt":"2020-10-28T20:41:13","slug":"wireguard-vpn-between-azure-and-oci-hosts","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/wireguard-vpn-between-azure-and-oci-hosts\/","title":{"rendered":"Wireguard VPN between Azure and OCI hosts"},"content":{"rendered":"
REF: https:\/\/www.wireguard.com\/<\/a><\/p>\n Ubuntu 18.04.5 LTS<\/p>\n NOTE: iptables on this server don't need adjustment it is open already<\/p>\n NOTE: open Azure Security Rule for port we are running on Ubuntu 20.04.1 LTS<\/p>\nAzure VM setup<\/h2>\n
root@wireguard-az:~# dig +short myip.opendns.com @resolver1.opendns.com\n*IPAddress*<\/code><\/pre>\n
\n
root@wireguard-az:~# apt install wireguard\n\nroot@wireguard-az:~# wg version\nwireguard-tools v1.0.20200513 - https:\/\/git.zx2c4.com\/wireguard-tools\/\n\nroot@wireguard-az:~# umask 077\nroot@wireguard-az:~# wg genkey > privatekey\nroot@wireguard-az:~# wg pubkey < privatekey > publickey\nroot@wireguard-az:~# ip link add wg0 type wireguard\nroot@wireguard-az:~# ip addr add 10.0.0.1\/24 dev wg0\nroot@wireguard-az:~# wg set wg0 private-key .\/privatekey\nroot@wireguard-az:~# ip link set wg0 up\n\nroot@wireguard-az:~# ip addr\n1: lo:
root@wireguard-az:~# ping 10.0.0.2 -c 1\nPING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.\n64 bytes from 10.0.0.2: icmp_seq=10 ttl=64 time=31.7 ms<\/code><\/pre>\n
\n310 wg 43971 Any IPAddress<\/em>\/32 Any<\/p>\nOracle OCI<\/h2>\n
root@usph-vmli-do01:~# dig +short myip.opendns.com @resolver1.opendns.com\n*IPAddress*<\/code><\/pre>\n