Solved: Connecting to Cyberghost VPN through OpenVPN

Hi all,

I've followed the instructions on https://support.cyberghostvpn.com/hc/en-us/articles/213811885-Router-How-to-Set-Up-OpenVPN-on-DD-WRT-Routers, and get as far as downloading the Cyberghost-provided zip file with all of the config files in it. Since the tutorial is obviously for DD-WRT based routers, it becomes completely useless for me at that point.

As a complete stab in the dark based upon other threads in this forum, I have uploaded the Cyberghost-provided openvpn.ovpn file through the LuCI interface and checked the 'Enabled' box, as well as scp'ing the ca.crt, client.crt and client.key files into /etc/openvpn. But after doing that and running /etc/init.d/openvpn restart && logread -e openvpn, I get the following error message at the bottom of the output:

Fri Aug  7 10:23:19 2020 daemon.err openvpn(CyberghostVPN)[10201]: neither stdin nor stderr are a tty device and you have neither a controlling tty nor systemd - can't ask for 'Enter Auth Username:'.  If you used --daemon, you need to use --askpass to make passphrase-protected keys work, and you can not use --auth-nocache.

This leaves me with the following questions:

  1. Has everything that I've done so far been correct?
  2. Where would I set the mentioned --daemon, --askpass and --auth-nocache options?
  3. Do I need to specify my login details in a text file somewhere, as hinted at here? If so, what is the required format for the userpass.txt file (as it is named in that example)?

LuCI seems to have renamed the openvpn.ovpn file to CyberghostVPN.ovpn and placed it in /etc/openvpn, along with a CyberghostVPN.auth file. But the latter is completely empty! I'm guessing this is my problem, but can't find any reference to that file anywhere anyway, so I'm confused as to whether or not it's actually being used (and if not, why the heck did LuCI create it?!).

MTIA for any help provided to solve this very confusing and frustrating issue :slight_smile:

P.S. I would much, much prefer to do everything in LuCI if possible, as the multitude of config files with differing extensions and locations confuses the crap out of a n00b like myself. But if it's absolutely necessary to use the shell, please provide exact commands and explanations of each one. Thank you!

Typically, you should get the username/password credentials from your VPN provider.
If they do not use this authentication method, remove the option auth-user-pass.

Thanks but that much was obvious to me. I was asking for the required syntax of the auth file, which I ended up finding elsewhere: username on first line, then pass. Simple :slight_smile: Plus I also had the name of the auth file missing from my .opvn file, since I didn't fill out the second text box on the relevant LuCI page. I guess that's also why the auth file was initially blank.

Last but not least, I also had to setup the firewall properly as discussed here.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.