OpenVPN setup on Proxmox

naupe

Member
Apr 8, 2019
36
4
13
37
My previous thread I asked how to remote into Proxmox. I was given some vague directions (NAT redirect to 8006; how do I do this?), and now I figure I should try to do remote access to Proxmox with a VPN.

I've installed Proxmox successfully on my Dell PowerEdge R710 Server (local IP is 192.168.0.100), and within Proxmox I've installed a Debian VM with PiVPN (which is OpenVPN from what I've read), which is local IP 192.168.0.101.

During the OpenVPN install on the VM, I created an OVPN file with the following settings:
Protocol: UDP
Port: 1194
OpenVPN Elliptical Curves? No
Encryption Key: 2048 (Diffie-Hellman Key, and HMAC key)
Public IP: 7.7.7.7
DNS Provider: Google
(let's just say my Public IP is 7.7.7.7 in this example)

I would like to be able to VPN into the Proxmox Web Interface (local IP is 192.168.0.100 and uses port 8006). So, how would I go about doing this? Here is what I've done since creating the OVPN file:
  1. Installed OpenVPN on my Windows Machine
  2. SCP'd the OVPN file to
    Code:
    D:\Program Files\OpenVPN\config
  3. SCP'd the OVPN file to Proxmox's
    Code:
    /home/root/ovpn
    directory
  4. On my Router, set to Forward
    Code:
    Port 1194, IP 192.168.0.101, Protocol UDP
  5. In Windows, I started up OpenVPN, put in the password, and it says
    Code:
    Connected To: <OVPN file's name>
    and
    Code:
    Assigned IP: 10.10.10.10
    (It's not really 10.10.10.10, this is just an example).

So now what? I've tried connecting to the following through my browser, but have gotten nothing back:
Code:
http://10.10.10.10:1194
https://10.10.10.10:1194
http://10.10.10.10:8006
https://10.10.10.10:8006
http://192.168.0.101:1194
https://192.168.0.101:1194
http://192.168.0.101:8006
https://192.168.0.101:8006
http://7.7.7.7:1194
https://7.7.7.7:1194
http://7.7.7.7:8006
https://7.7.7.7:8006

I must be missing something I assume?

I've also seen these 2 guides online which look really helpful (which I'm willing to try if people here believe this is not the right way to get remote VPN access to Proxmox):
https://www.hungred.com/how-to/setup-lxc-nat-proxmox/
https://www.hungred.com/how-to/setup-openvpn-on-proxmox-lxc/
but they don't really explain what to do afterwards. Like do I need to install OpenVPN on my system and then login through it?
 
Assuming your VPN connection works it connects just your PC to the Debian VM (verify, if this works be connecting from your PC to the VM using it's VPN address 10.10.10.x).

In order to access at Porxomox's WEB GUI you have to route the connection to it, AFAIU in your example 192.168.0.100, but this requests
* enable forwarding in the VM
* route-entry in your PC that VPN should used for 192.168.0.0/24
* route-entry in your Proxmox host that 192.168.0.101 is the gateway for VPN addresses 10.10.10.0/24

Then connecting via https://192.168.0.100:8006 should work.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!