OpenVPN - can't log in

    • OMV 4.x
    • Virgil.A wrote:

      My advice to you guys is to stop using this plugin, it does not work for me either, and it happens every time I update something on the server, so I chose to go the docker way.
      Fairly simple:

      open ssh terminal to your server and copy paste:

      OVPN_DATA="ovpn-data-myvpn"docker volume create --name $OVPN_DATA

      docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_genconfig -u udp://DNS-SERVER.COM-OR-IP

      docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn ovpn_initpkidocker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN kylemanna/openvpn

      docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass

      - nopass if you just want to connect to your VPN server only with your *.ovpn file, or remove nopass for login with username - password

      docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn

      cat CLIENTNAME.ovpn

      copy the contents of this file on your host, text editor save as CLIENTNAME.ovpn than just connect.Works like a charm.
      Hi,i had so much trouble with OMV 4.19 openvpn plugin, always shows waiting for server, no matter what i do, ie edit server conf, it just wouldn't work even my firewall and router are already properly setup.
      I followed your guide and copy and paste the command lines one by one...

      I changed DNS-SERVER.COM-OR-IP in ovpn file to my domain... my android client shows waiting for server again... i really have no idea why....

      I can no longer fine the server.conf file in etc/openvpn.... wanted to add push "route $vpn_network $vpn_mask" and see what happens....

      any advise will be greatly appreciated. thx!

      The post was edited 3 times, last by bbsen666 ().

    • Virgil.A wrote:

      After poking a while to make this work and yes THIS thread helped a lot to figure out my problem. Could not find a tutorial for this at all but here it is my attempt of creating one:

      - First install the plugin (openmediavault-openvpn 4.0.1)

      General settings:
      - Configure the plugin:
      - enable: true
      - port: 1194
      - use compression: true
      - PAM: true

      VPN network:
      - Address:
      - MASK:
      - Gateway interface: your internet interface (mine is ens5, but the interface is in the dropdown list just select the one connected to the internet)
      - Default gateway: true

      DHCP options
      everything is empty

      - Public address: your IP or if NO-IP use your

      - ssh into your server
      - cd /etc/openvpn/
      - nano server.conf
      - find in this file something like ;push "route" (the IP address can be different 192.xx.xx.xx)
      - in the above two things need to be changed first remove the ; if you have one in your config file, and than change the IP to the same VPN address
      - From this: ;push "route" to this: push "route"
      - restart the openvpn service: service openvpn status check if already started service openvpn stop, service openvpn status be sure it stopped, service openvpn start, service openvpn status be sure it started

      - first create a user from left menu ACCESS RIGHTS MANAGEMENT -> User
      - navigate back to your openVPN -> certificates click on ADD and select the user and give it a common name and finally save.
      - select the user and click on DOWNLOAD CERTIFICATE
      - Extract the archive
      - in your VPN GUI import *.ovpn file

      - if you have a router between your server and internet do not forget to open port 1194 UDP
      I stopped openvpn in docker and re-installed openvpn plugin in OMV again because of the missing server.conf...
      mysteriously it works right after I enable the plugin.... i didn't do anything special this time...

      my VPN connection cannot get access to internet, though.... when I enabled redirect gateway...line... it doesn't work anymore...

      anyway I will keep it this way for time being... a bit tired of it.... i won't update the system again until OMV stable releases and I will do a fresh installation...