VPC Access via OpenVPN

I am trying to block SSH access to my VPS from Internet, the idea is to block incoming SSH port using DigitalOcean cloud firewall for public IP interface. To connect to my VPS I am planning to SSH the private IP via VPN (OpenVPN).

Currently I already have OpenVPN server running and can ping the it self VPN server private IP from my notebook. But somehow I can’t ping/access other private IPs from my notebook.

Please help how I can achieve this scenario?

Submit an answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
June 7, 2023

Hi there,

I’ve just tested this with the 1-Click OpenVPN installation from the Marketplace:

During the setup, the private subnets should be detected automatically and you will be asked if you want the private sunets to be accessible to clients by default, eg:

Private subnets detected: ['', '']

Should private subnets be accessible to clients by default?

> Press ENTER for default [yes]:

If you set that option to yes, when you are connected to the VPN you should be able to access the rest of the Droplets within that same VPC.

If you did not select that option during the initial setup, you can update it via the OpenVPN Access Server’s web interface. Here’s how to find it:

  1. Log in to the admin web interface. Usually, the URL is https://your_server_ip:943/admin unless you’ve changed the port
  2. Go to VPN Settings.
  3. You should find the option “Should client Internet traffic be routed through the VPN?” Ensure this is set to “Yes”.
  4. Below that, you should find “Should clients be allowed access to networks on the server side?” Make sure this is also set to “Yes”.

Let me know how it goes!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel