Openvpn client setup on TrueNas 14

jonprust

Cadet
Joined
Aug 3, 2022
Messages
2
Hello, I have a PFSense firewall configured as an OpenVPN server, which allows me to access resources like the company's file server.
I started using TrueNas as a remote backup server for these files, and I would like to access them through pfsense's OpenVPN.
To do this i created a new certificate and key. So i have in hands the CA Certificate, the client certificate, and the client key.
Where can I insert this information to connect to my server?
Captura de tela de 2022-08-03 16-01-45.png

This is the system > certificates > Import certificate screen, but i cannot see where to insert the CA Certificate, and user, password.
 

Tim1962

Patron
Joined
Feb 26, 2015
Messages
281
I maybe completely off beam, but I did the exact same for my home system, and basically

set up pfSense.
set up OpenVPN on pfSense
I could access other items on the home network, but not get to TrueNAS nor any of the jails etc
Solution, simply add a static route in TrueNAS / networking for the VPN IP address

Hopefully the answer you need :smile:
 

jonprust

Cadet
Joined
Aug 3, 2022
Messages
2
I maybe completely off beam, but I did the exact same for my home system, and basically

set up pfSense.
set up OpenVPN on pfSense
I could access other items on the home network, but not get to TrueNAS nor any of the jails etc
Solution, simply add a static route in TrueNAS / networking for the VPN IP address

Hopefully the answer you need :smile:
Hi Tim1962, thanks for your attention, my problem is that i cannot access the VPN server(PFSense) from my openvpn client(TrueNAS), i have some progress, but the pfsense openvpn is configured to tell username and password:
I found the way to enter the CA certificate:
Captura de tela de 2022-08-04 09-34-29.png

And I was also able to include the generated certificate in openvpn:
1659616578827.png

Still I didn't find a field to add username and password in openvpn config:
Captura de tela de 2022-08-04 09-57-17.png


Is there a way to put the user and password?
 

Tim1962

Patron
Joined
Feb 26, 2015
Messages
281
Sorry, not exactly the same issue:frown:
Can't help further, good luck
 

SuperWhisk

Dabbler
Joined
Jan 14, 2022
Messages
19
I assume you mean TrueNAS 13, as 14 doesn't exist yet :wink:

Unfortunately username and password must be provided in a file in cleartext (or at least I haven't found another way to do it using the client service built into TrueNAS 12+).
Add an additional parameter auth-user-pass /full/path/to/file.txt in the configuration UI. In the file you put the username on line one, and the password on line two. I put mine in /root/.openvpn/auth-user-pass.txt and set permissions to 400.

See the manpage for more details on this and other config options.

Also, I would recommend you use TLS Crypt Auth to encrypt the control channel packets used to establish the VPN tunnel for added security.
 
Last edited:

Pabs

Explorer
Joined
Jan 18, 2017
Messages
52
Quick question, after connected to the VPN then the TrueNAS box is no longer accessible via the UI, how can local access be preserved while also remaining connected to the VPN?
Thx
 
Top