Report this

What is the reason for this report?

Use Private DNS from VPN Connection

Posted on October 9, 2020
BrianVeg

By BrianVeg

Solution Architect

I have setup a VPN between Digital Ocean and my private network. I would like to use the DNS I have setup on that network for my VPN clients to use. Is this possible?



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!

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.

Hi, I believe the answer to your question strongly depends on the configuration. In my case I cannot use DNS servers of my home office network because there are accessible just from inside my ISP’s network, and my internet gateway is in DO’s network when vpn connection is established. Here is my configuration:

       Internet
          |
          |                                     
 ------------------                          ------------------
|   DO Droplet 1   |     10.8.0.0/24        |   Home Office    |
|    (CentOS 8)    |_________VPN_______     |   ISP's router   |
| Internet gateway |                   \----| Internet gateway |
|    VPN Server    |                    \    ------------------
| Front-end Server |                     \____  |
 ------------------                           | |LAN 192.168.0.0/24
          |                                   | |------------
          |VPC                                | |            |
          |10.106.0.0/20                     -------------   | 
          |                                 |     PC 1    |  |
 -----------------                          | VPN Client/ |  |
|  DO Droplet 2   |                         | VPN Gateway |  |
|  (Ubuntu 20.04) |                         |  (CentOS 7) |  |
|   VPN Access    |                          -------------   |
 -----------------                                           |
                                             -------------   |
                                            |     PC 2    |  |
                                            |  VPN Access |--
                                            | (Windows 10)|
                                             -------------

So, I have to use either DO’s DNS servers or publicly accessible servers (e.g. OpenDNS, Google, etc.).

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.