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?

5
  • 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 1, 2019 at 2: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. Apr 1, 2019 at 3:55
  • Then your problem is similar enough to these two answers: serverfault.com/a/146523/470077 and 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 1, 2019 at 13:32
  • Possible duplicate of openvpn restriction
    – ender.qa
    Apr 1, 2019 at 13:33
  • That's not a duplicate of this question.
    – womble
    Apr 10, 2019 at 4:16

0

You must log in to answer this question.

Browse other questions tagged .