so i am trying to use the built-in openvpn server on scale. its not straightforward.
my issue is the certs. im watching all the youtube vids and thats where i am getting hung up for 2 reasons:
- im on scale and all of youtube seems to be dedicated to core, which is not the same in some cases
- i use a static IP not a FQDN, so that makes certs so much more fun
does anyone know how to setup an openvpn server on scale with a static ip using the proper certs like i described above?
thanks so much for the help.
**UPDATE**
the solution is in this video: https://www.youtube.com/watch?v=S8I-IiQYVas which even though is for core works perfectly on scale as long as u realize the boxes he is typing in are named the same but are in a different place on his screen. easy tutorial, just remember to add the Common Name to your certs otherwise you wont be able to download the client ones.
to get your remote clients access to your local assets, add these additional parameters to the Additional Parameters box in the Open VPN Server settings in Services:
push “route 192.168.1.0 255.255.255.0”
push “redirect-gateway def1”
you should replace 192.168.1.0 with whatever net your truenas server sits on.
in network, add this static route:
destination = 192.168.2.0/24
gateway = [ip of your truenas]
in System Settings → Advanced → Init/Shutdown Scripts, add this command post-init
iptables -t nat -A POSTROUTING -s 192.168.2.0 -o enp3s0 -j MASQUERADE
where the 192.168.2.0 is the net my openvpn is giving out IPs on and enp3s0 is the ethernet adapter when i run ifconfig. restart your server for this to take effect, or just open the shell and run it from there, but also make sure to include it in the init/shutdown scripts to make it persistent across reboots.
**UPDATE 2**
use this guide for a much easier experience
https://github.com/imjustleaving/trueNAS/wiki/Installing-an-OpenVPN-Server-on-TrueNAS-Scale