- Setup Ubuntu Server for OpenVPN (AWS) -
- Install via
https://github.com/Nyr/openvpn-install
. Be sure to run bash script as root. - Download OpenVPN Connect Client on computer1 and connect to VPN using generated
.ovpn
configuration file - To create another
.ovpn
client config (for second computer), run bash script once again but this time select option #1 (Add a new client) - Download OpenVPN Connect Client on computer2 and connect to VPN using generated
.ovpn
configuration file - Edit
/etc/openvpn/server/server.conf
and appendclient-to-client
to end of file - Restart OpenVPN service (
sudo service openvpn restart
) - Allow inbound traffic over UDP port 1194 in the server firewall (AWS: https://i.imgur.com/yEIwGhO.png)
- Install via
- Add Windows Defender Firewall exclusions to host AND client machine -
- Open Windows Defender Firewall
- Select "Allow and app or feature through Windows Defender Firewall" on the left sidebar
- Locate "File and Printer Sharing" and check both boxes
- Save and exit
- Ensure host and client can communicate -
- Open
cmd.exe
on the host and runipconfig /all
- Locate entry where description looks similar to
TAP-Windows Adapter V9 for OpenVPN Connect
- Take note of the shown IPv4 Address
- Open
cmd.exe
on the client and runping
followed by the host IPv4 address - If you see
Request timed out.
return to step #2 and ensure you've followed along carefully; otherwise, you may proceed with step #4.
- Open
- Configure Hyper-V host and client machines using instructions at https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/remotely-manage-hyper-v-hosts#connect-to-a-windows-server-2016-or-windows-10-remote-host-outside-your-domain-or-with-no-domain (follow very carefully).
FQDN
: fully qualified domain name AKA device name (found in Settings -> System -> About)
- Ensure host and client Windows account username and password is identical (otherwise you may encounter an error something like:
You do not have the required permission to complete this task.
). - Map Hyper-V host IPv4 address to hostname -
- Run Notepad/Notepad++ as administrator
- Open HOSTS file (
C:\Windows\System32\drivers\etc\hosts
) - On a new line, enter the host IPv4 address followed by the host device name (example: https://i.imgur.com/mteeqQR.png)
- Connect via Hyper-V Manager -
- Open Hyper-V Manager on the client
- Select "Connect to Server..." on the right sidebar
- Check "Another computer" and enter the host IPv4 address
- Click OK to connect!
Written and tested by: 5E7EN (Simon)