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:
      hub.docker.com/r/kylemanna/openvpn

      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)

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

      VPN network:
      - Address: 10.8.0.0
      - MASK: 255.255.255.0
      - 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:
      - Public address: your IP or if NO-IP use your domain.ddns.net

      FIXING THE SERVER:
      - ssh into your server
      - cd /etc/openvpn/
      - nano server.conf
      - find in this file something like ;push "route 192.168.0.0 255.255.255.0" (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 10.8.0.0
      - From this: ;push "route 192.168.0.0 255.255.255.0" to this: push "route 10.8.0.0 255.255.255.0"
      - 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

      CERTIFICATES:
      - 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 BEHIND ROUTER:
      - 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...