Question

How to connect a Droplet to VPN?

I have a Django application running on a droplet that collects data from several IoT devices on customer sites. These IoT devices are currently openly accessed but will soon be put behind a VPN. How do I connect my droplet to an external VPN to still be able to access the data?


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
January 22, 2023

Hello @m4rkus

As Bobby mentioned you’ll need a VPN client in order to connect to the network. The openvpn client should do the job for you, but this may vary from the VPN configuration on the remote server as well.

https://openvpn.net/vpn-server-resources/connecting-to-access-server-with-linux/

Regards

Bobby Iliev
Site Moderator
Site Moderator badge
January 21, 2023

Hi there,

I believe that this might depend on the VPN setup on the customer side, but what you might be able to do is to use a VPN client to connect the server to the external VPN service.

Depending on the VPN server, you could use the OpenVPN client to do that.

If you are using Ubuntu, you can install OpenVPN using this command: sudo apt install openvpn. Once you’ve installed the package, can create a config file using your favourite text editor: sudo nano /etc/openvpn/client.conf, in there add the configuration file (opvn) from your customer’s VPN service. Save the config file and then start the OpenVPN client: sudo openvpn --config /etc/openvpn/client.conf.

Hope that this helps!

Best,

Bobby