Unable to find files to complete OpenVPN RockOn install

I am trying to complete the install for OpenVPN where you have to go and run some files in the “/opt/rockstor/bin/” location

  1. ovpn-initpki
  2. ovpn-client-gen
  3. ovpn-client-print
    but I do not have the /bin directory when I log on as root and try to navigate there. Am I missing something or is it because it is running out of a docker file? I am not well versed in Docker so I know that there could be something I am missing with this.

Thanks!

@Sweepy welcome to the Rockstor community. Since you are, I assume, running the version 4.5.8-0, you have found a missing update to the Rockon Documentation (both in the documentation, as well as the Rockon information button itself).

With the switch to using poetry for the installation and introducing the virtual environment venv within Rockstor, some of the paths have changed. In your case, I believe, instead of using this path
/opt/rockstor/bin/
you need to change it to include the virtual environment directory, like so
/opt/rockstor/.venv/bin/

This should now allow you to run the instructions like this:

Additional steps are required by this Rock-on.

Run these following commands as the root user on your Rockstor system, i.e., via a ssh console.

Initialize PKI The OpenVPN Rock-on will not start without it.

/opt/rockstor/.venv/bin/ovpn-initpki

Generate a client certificate One for each client

/opt/rockstor/.venv/bin/ovpn-client-gen

Retrieve client configuration For any one of your clients. The resulting .ovpn file can be used to connect to this OpenVPN server.

/opt/rockstor/.venv/bin/ovpn-client-print

Configure firewall

If your Rockstor system is behind a firewall, you will need to configure it to allow OpenVPN traffic to forward to your Rockstor system.

Let us know, whether that works for you, and then we can work on updating the documentation and the Rockon information.

3 Likes

I have created 2 issues (one in the Rockon Registry, one in the Rockstor documentation repository) that need to be updated, once we are on our next official release:

and

4 Likes

@Hooverdan Thanks! This is exactly what it was. Got everything working after I navigated to the location. I now realize that I should have just searched for the files throughout the system, but thanks for still giving me the information that I needed. :smile:

4 Likes

Hello, I have a problem when executing the command:

/opt/rockstor/.venv/bin/ovpn-client-gen

Traceback (most recent call last):
File “/opt/rockstor/.venv/bin/ovpn-client-gen”, line 6, in
sys.exit(client_gen())
^^^^^^^^^^^^
File “/opt/rockstor/src/rockstor/scripts/ovpn_util.py”, line 34, in client_gen
client_name = raw_input("Enter a name for the client(no spaces): ") # noqa F821
^^^^^^^^^
NameError: name ‘raw_input’ is not defined

Something similar happens with the following command:

/opt/rockstor/.venv/bin/ovpn-client-print

@ZeusMR welcome to the Rockstor community. Which version of Rockstor are you running? Is it 4.6 or 5.x?

Well, a little more research here, it appears that the function raw_input has been renamed to input in Python3:

and apparently nobody has tested this in the 5.x version, since it’s a specific script for the OpenVPN Rockon (I don’t think we have any automated tests for this piece).

I have created an issue for the testing channel on Github:

If you can’t wait for a fix, you could possibly manually change the file ovpn_util.py (replace the raw_input entries with just input and then the commands should work). I tried it on a test install and that seems to do the trick.

I would be remiss not to mention our new Rockstor-native WireGuard implementation that’s available in the most recent (test) versions of Rockstor. There is also simple WireGuard Rockon if you want to try that out first.

2 Likes

Yes, I have version 5.0.8 of Rockstor.
Thank you very much for the response, I’m going to test the solution.
Excellent day for everyone in the community.

2 Likes