Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Open Vpn
Nishita Mohanty
Nishita Mohanty

Posted on • Edited on

     

Open Vpn

How to connect a private server(i.e. the server without a public IP address)?
Well there is a solution for the above concern, which leads us to learn a new concept named OpenVpn.

So, what is OpenVpn?
Well OpenVpn is a type of computer network that provides users with remote access to resources on the internet.

So how can we use it to connect a server?
Well the solution to the above query is given below.

STEP 1. Launch an instance without public IP.
Image description

Image description

So, to connect the server we have to setup a VPN connectivity.
**
STEP 2. Go to **launch instances
then in the search bar search for openvpn -> click on 44 results.
Image description

Then select the 1st openvpn.
Image description
STEP 3. Then launch another instance with public IP enabled -> create new key pair -> launch instances.

Image description
Image description
Image description

Now, we can see that both the instances which we have launched have same VPC ID.
Image description
Image description

STEP 3. Now we need to connect the second server i.e. with public IP to Xshell -> Then type yes and then enter multiple times.
Image description
Image description
Image description
Then openvpn will initialize
Image description
Then after some time again paste the same command (SSH client) and of root writeopenvpnas -> then again connect with the key pair.

Now already a openvpn (user) is created so now we have to change password.
So, type sudo passwd -> enter
Give password

Image description

Then scroll up and copy link of Admin and Client and paste it in notepad.
Image description
Now close Xshell.

Now, copy the admin's url and paste it in browser -> login to openvpn -> Agree
Image description

Image description

Now again go to instances.
Then connect the instance (without public IP) through Xshell
Image description

But we will notice that it wont get connected.
Image description

STEP 4. Now open OpenVpn -> connect -> next (multiple times) -> agree ok -> Give url i.e. copy the IP of client link and paste -> next -> accept -> username : openvpn ->Password: give the password which u have set earlier in Xshell -> Accept -> Connect -> Password -> OK

Image description
Image description
Image description
Image description
Image description
Image description
Image description
Image description
Image description

Then go to Xshell and try to connect the instance (without public key) again. Now, u will be able to connect/access the instance.
Image description

So, this is the way by which we can connect servers without public IP address through openvpn.

Top comments(1)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
carissb profile image
carissb
  • Joined

If you need the best OpenVPN solution,noprox is the way to go. It offers high-speed, secure, and reliable connections, ensuring privacy and unrestricted access to online content. With strong encryption, no logs, and global server coverage, NoProx keeps your data safe while providing a seamless browsing experience. Whether for streaming, gaming, or business, NoProx is the ultimate choice for a secure and open internet.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

More fromNishita Mohanty

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp