TrueNAS Scale - VPN client to app routing

bigstoo

Cadet
Joined
Jan 23, 2021
Messages
6
I have a TrueNAS installation that has the IP address 192.168.8.251/24. It also has the VPN client running, which has the IP address 10.69.99.251/24.

If I try to access the TrueNAS GUI via either of the above IP addresses (assuming, of course, that I am on the correct subnet in the first place) then it works fine.
I have a Storj app running, listening on port 20909. I can access it via 192.168.8.251:20909 but not 10.69.99.251:20909.

Is there a way to get the Storj app listening on all interfaces, not just the eth0 interface?
 

bigstoo

Cadet
Joined
Jan 23, 2021
Messages
6
Just to add a little more.

I also have a Plex app running. That can be accessed by either 192.178.8.251:32400 and 10.69.99.251:32400 so it seems to be something specific to the Storj app and not apps in general.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
In the config.yaml of the storj app, do you find this?:
server.address: :28967
 

bigstoo

Cadet
Joined
Jan 23, 2021
Messages
6
In the config.yaml of the storj app, do you find this?:
server.address: :28967
I do indeed, yes. That's the port that Storj connects to me on, and that's working fine as it's all done over the local subnet.

I want to be able to access the webGUI on port 20909 over the VPN link.
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I guess the webGUI is identified as the console.address... so maybe you can set that to something that will help you.
 

bigstoo

Cadet
Joined
Jan 23, 2021
Messages
6
console.address is set to 14002. No idea what that is but the webGUI is definitely on port 20909 and there's no mention of that in config.yaml
 

Dohuginn

Dabbler
Joined
Nov 6, 2022
Messages
35
Hi.
I found your post and decided to ask so as not to create a new one. Did you manage to solve the problem of access through the vpn ip address? I have the same problem, but with Tvheadend access.
 

Geso71

Cadet
Joined
Jun 17, 2023
Messages
5
Hello,
Same problem here, plex seems to work fine remotely even with the VPN (private address of the server, mine is 192.168.5.1 while physical is 192.168.2.6) but i can neither access home assistant nor syncthing with the according ports appended to 192.168.5.1 address. Has anyone here found a solution to this problem???
 

Geso71

Cadet
Joined
Jun 17, 2023
Messages
5
I have a TrueNAS installation that has the IP address 192.168.8.251/24. It also has the VPN client running, which has the IP address 10.69.99.251/24.

If I try to access the TrueNAS GUI via either of the above IP addresses (assuming, of course, that I am on the correct subnet in the first place) then it works fine.
I have a Storj app running, listening on port 20909. I can access it via 192.168.8.251:20909 but not 10.69.99.251:20909.

Is there a way to get the Storj app listening on all interfaces, not just the eth0 interface?
Eventually I figured this out. If your OpenVPN Network is 10.69.99.0/24 and your physical LAN is 192.168.8.0/24, then you have to add to the additional parameters of the OpenVPN configuration the following line:

push "route 192.168.8.0 255.255.255.0"

And you will also have to allow ip forwarding. In sysctl settings add:

net.ipv4.ip_forward

Value --> 1

This will ensure that when you are remote, (in a public network) your OpenVPN Server in your house will push the route to the physical LAN to your device as a static route. This way you will still be able to reach your TrueNAS Scale Apps remotely by the addess 192.168.8.251 (as if you were at home instead of 10.68.99.251).

DISCLAIMER!!!
Now, there may be a problem in the case in which the physical remote LAN you are connected to also happens to run in 192.168.8.0/24, then because the CONNECTED route will be preffered instead of the STATIC route, you will not reach your TrueNAS Server Apps. (Still trying to figure this one out).
 

Dohuginn

Dabbler
Joined
Nov 6, 2022
Messages
35
The "push route" option does not work and the problem is not in the vpn settings. IP VPN access to Plex is proof of that. Any other options?
 

Geso71

Cadet
Joined
Jun 17, 2023
Messages
5
The "push route" option does not work and the problem is not in the vpn settings. IP VPN access to Plex is proof of that. Any other options?
With the push route option you will NOT be able to access your StoreJ by the ip --> 10.69.99.251:20909, but you will be able to access it from the ip --> 192.168.8.251:20909 (Even remotely!! ). This happens because with the push route option literally pushes the physical lan (192.168.8.0/24) of your home to your remote location.

(You only have a problem in case the remote network that you are connected to is also 192.168.8.0/24 in which case route priorities matter, (connected > static) and you will not be able to connect, this is why i have configured mine physical lan in 10.11.1.0/24 and VPN 10.11.5.0/24 that are not that common)

Plex App works because you might have the 32400 port open internally to access plex. Anyway, many things work differently in plex as it is a very big project that has build in remote access features.
(i had the exact same thing - plex worked but everything else no)

The problem as I see is in OpenVPN settings:

make sure you have the following configuration.
Screenshot 2023-06-19 at 10.37.14 PM.png


With this configuration when connected to VPN you will be able to connect to storeJ with the ip --> 192.168.8.251:20909 (remotely).
(by port forwarding only the port of the OpenVPN or none if you use a reverse proxy)

Anyway, i hope this helps.
 

Geso71

Cadet
Joined
Jun 17, 2023
Messages
5
With the push route option you will NOT be able to access your StoreJ by the ip --> 10.69.99.251:20909, but you will be able to access it from the ip --> 192.168.8.251:20909 (Even remotely!! ). This happens because with the push route option literally pushes the physical lan (192.168.8.0/24) of your home to your remote location.

(You only have a problem in case the remote network that you are connected to is also 192.168.8.0/24 in which case route priorities matter, (connected > static) and you will not be able to connect, this is why i have configured mine physical lan in 10.11.1.0/24 and VPN 10.11.5.0/24 that are not that common)

Plex App works because you might have the 32400 port open internally to access plex. Anyway, many things work differently in plex as it is a very big project that has build in remote access features.
(i had the exact same thing - plex worked but everything else no)

The problem as I see is in OpenVPN settings:

make sure you have the following configuration.
View attachment 67542

With this configuration when connected to VPN you will be able to connect to storeJ with the ip --> 192.168.8.251:20909 (remotely).
(by port forwarding only the port of the OpenVPN or none if you use a reverse proxy)

Anyway, i hope this helps.
fill the routes with your routes obviously (i didnt mean to say "use this config" rather i meant to just share my config)
 
Top