In a previous blog, I explained how to connect to an instance with private IP. This blog explains how to connect to the private instance using a VPN.
step 1:
First, create an instance that does not have a public IP.
step 2:
Go to Amazon AMI->Market Place search OpenVPN and click on select->continue.
step 3:
After this configure the instance and make sure to give it a public IP.
step 4:
Then connect to the instance using the ssh client then click yes to agree on agreements and click enter to every option.
step 5:
It won't connect because we have to change the name root to openvpnas. Copy the Admin UI and Client UI to the notepad. Then connect by giving username openvpnas. Because we are trying to connect to the vpn, not the root.
step 6:
After it will get connect give the password to the vpn by providing the following commands.
sudo passwd openvpn
step 7:
After that go to notepad where you pasted the Admin UI and client UI. Again copy the Admin UI then paste it on google search. Then it will ask you for the id and password. Provide the id as OpenVPN and give the password you have created and log into that VPN. There you can manage who can access the server and other permissions.
Step 8:
After that go to openvpn website and install OpenVPN in the client's system so they also can connect to the private server.
Step 9:
After the installation, copy the client UI, paste it into the URL, and give the password you created and on the VPN so that the client can access the private server.
That's it. After these steps, both you and your clients will be able to connect to the private server.
Hope you all find it informative!!
Top comments (0)