0

I have a digitalocean droplet running Ubuntu 18.04.2 and nginx, and an API built with the Django Rest Framework on it. The specs of the project I'm working on require a VPN to be set up, so I've set up OpenVPN on the droplet. I've also generated a config file to send to the client that will be connecting to my API.

My API is currently still accessible by anyone who has the IP address and the username/password combination I've created. My question is: how can I configure my server/OpenVPN to allow access only to the client that I am going to give the configuration file to?

  • Please clarify: You have a client, who already has OpenVPN client setup, and has the VPN Config file, as well as any necessary certificates and keys. And you want this client and **only this client** to connect to your Django API? – ender.qa Apr 01 '19 at 02:47
  • @ender.qa yes! High level it'd be something like anyone who I've sent a config file to, but for this project there's only one other client (other than mine that I'm using to set everything up) that will be receiving a config file and the necessary keys/certs. – paolompmojica Apr 01 '19 at 03:55
  • Then your problem is similar enough to these two answers: https://serverfault.com/a/146523/470077 and https://serverfault.com/a/155385/470077. The summary = you want to use a firewall on your droplet to restrict access to your AP to certain IP addresses. – ender.qa Apr 01 '19 at 13:32
  • Possible duplicate of [openvpn restriction](https://serverfault.com/questions/146519/openvpn-restriction) – ender.qa Apr 01 '19 at 13:33
  • That's not a duplicate of this question. – womble Apr 10 '19 at 04:16

0 Answers0