Setting up an outside route to my TrueNAS server

Grid21

Dabbler
Joined
Oct 7, 2023
Messages
37
Ok, first of all before I say anything. I am a visual learner, please understand my learning style and be willing to teach me.

I am trying to set up a way to connect to my home server either by using OpenVPN, which seems easier to do, or WireGuard, which someone over on the TrueNAS Discord was SOMEHOW, though it's really NOT easier to do. I have a DDNS that No-IP provides. I need a way to get to my server using my No-IP address. Can someone please be kind enough to walk me through which server I should set up, the EXACT explained detailed directions, and if possible, show me a solid tutorial video I can use to help me better understand. I was using OpenVPN, but for some reason I am not sure why yet, my DDNS didn't seem to allow me to connect to my TrueNAS server.

Please be patient with me as Linux is NOT Something I use on a daily basis. Thanks in advanced.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Don't worry, TrueNAS CORE does not use Linux, either :wink:

Seriously, the best way would be to use your Internet router to create a VPN access to your LAN, the TrueNAS system included. Can your router do that?
 

Grid21

Dabbler
Joined
Oct 7, 2023
Messages
37
Don't worry, TrueNAS CORE does not use Linux, either :wink:

Seriously, the best way would be to use your Internet router to create a VPN access to your LAN, the TrueNAS system included. Can your router do that?
I can enable a VPN through my router, and I have a serious of options here. But I don't know what to do with the CAs/Certification.

1701040911912.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You don't need to do anything on your TrueNAS. Just follow the documentation of your router. If there is a forum for that product - all the better. OpenVPN is good. If your router can do it - perfect solution.
 

Grid21

Dabbler
Joined
Oct 7, 2023
Messages
37
You don't need to do anything on your TrueNAS. Just follow the documentation of your router. If there is a forum for that product - all the better. OpenVPN is good. If your router can do it - perfect solution.
It does seem to support OpenVPN, but it looks like I have to use an older version of OpenVPN for it to work. And WireGuard seemed to far out of my wheelhouse of understanding. Is fine to run OpenVPN on TrueNAS and is there a way to get my No-IP to actually work? I understand how port-forwarding works, but unless I wasn't supposed to put my real IP in the same place as my No-IP, in the "Subject Alternative Names" it wasn't letting me connect from my laptop on a Mobile Hot Spot. It did once connect fine with my public IP, so I figure I must have done something wrong?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What is a "No-IP"? Subject alternate names are mandatory for certificates now, yes. You put the same FQDN as you have in the CN field in the SAN.
 

Grid21

Dabbler
Joined
Oct 7, 2023
Messages
37
What is a "No-IP"? Subject alternate names are mandatory for certificates now, yes. You put the same FQDN as you have in the CN field in the SAN.
No-IP is a dynamic IP service that lets you have a custom IP that gets, for lack of a better term, "tied" or "linked" to your public IP address. The new issue I am running into now, is that when I go to OpenVPN to start the connection, I am getting a, what I think is, time out error even though the port to the TrueNAS Server is open. My theory, though I am going to assume I am wrong, is there some firewall in TrueNAS that's now allowing the connection? I know the No-IP address works because I tested it with a Minecraft server on a Windows machine and when I opened the ports in the Windows Firewall, that external connection worked. So I can't figure out why it's NOT working for the TrueNAS server even though the port is open on the router and is pointed to the internal IP address of TrueNAS.

Also, in the SSH terminal, TrueNAS can ping my dynamic address. So it's able to resolve, it's just from the outside in, I can't get to the server.
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
is there some firewall in TrueNAS that's now allowing the connection?
Absolutely and definitely not. And sorry, no idea about that No-IP thing.
 

Grid21

Dabbler
Joined
Oct 7, 2023
Messages
37
Absolutely and definitely not. And sorry, no idea about that No-IP thing.
The weird part I can't figure out is, I was following this tutorial and a similar tutorial, and I can't figure out what step I am missing that this is NOT working.

Also, in my OpenVPN Server settings, do I need these "Additional Parameters" to make connections work?


Code:
push "route 192.168.0.0 255.255.255.0"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 1.1.1.1"
push "dhcp-option DNS 1.0.0.1"
 

Davvo

MVP
Joined
Jul 12, 2022
Messages
3,222
The video is 3 years old, things likely changed.
Afaik, the OpenVPN service doesn't work: you have to build your own in a jail I believe.

Going router really is the easiest, and possibly securest, solution.
 
Last edited:

Grid21

Dabbler
Joined
Oct 7, 2023
Messages
37
Update, my CA cert works fine. I tried importing the OpenVPN Client to my Android phone, and I was able to connect to my storage server over LTE+. So apparently, Windows 10 is having an issue with OpenVPN. But at least it tells me, my CA and OpenVPN Server/Client ARE working.
 

Grid21

Dabbler
Joined
Oct 7, 2023
Messages
37
The video is 3 years old, things likely changed.
Afaik, the OpenVPN service doesn't work: you have to build your own in a jail I believe.

Going router really is the easiest, and possibly securest, solution.
I posted an update to the issue just now. For some reason, Windows 10 is having issues with OpenVPN software, but it runs fine on my Android phone.
 

Grid21

Dabbler
Joined
Oct 7, 2023
Messages
37
I fixed it! I needed to switch on 2 services in Windows to allow OpenVPN to work. So I will now mark this as solved and continue using OpenVPN for my uses. Thanks anyway to those who offered help! :D
 
Top