Connect to Jails through TrueNAS IP Address... Help?

Joined
Jun 24, 2017
Messages
338
Hey guys... so, ive been trying to tackle how to get this tow work right... and Im missing something.
Im running TrueNAS 12.0 on a ML350 G8 build, 96GB RAM, blah blah blah...

Anyway, what im looking to do is set up a bunch of jails but not taking up 8 IP addresses on my network... I'd love to be able to go to the IP address of the FreeNAS and just change the port to whichever service im looking for... so, lets say FreeNAS is build on IP address 192.168.1.2... I want to build a jail for sonarr, but be able to go to 192.168.1.2:8989 to reach it... and for transmission, a seperate jail, and reach it by going to 192.168.1.2:9091 ...

I THOUGH NAT was supposed to be the way to have this set up effectively automagically... but i can not get it to work and am not sure what I am doing wrong...

Or, maybe im just wrong about how NAT works? ANy help is appreciated!! (And im happy to supply whatever additional info you guys might need/want)
 
Joined
Jan 7, 2015
Messages
1,155
The FreeNAS IP will always just be the FreeNAS IP. You are going to chase your tail around trying to get this to work. You can accomplish basically this by just installing all of your software into one jail. Having and or needing multiple jails for similar softwares is not necessary. Resistance to breakage is the only reason I can think to not do it this way. The major benefit of having all software in one jail helps extremely with permissions issues, mountpoints, snapshots, backups, become much simpler, to name a few big ones.

NAS 192.168.1.2
JAIL1 192.168.1.3
--sonarr 192.168.1.3:8989
--cp 192.168.1.3:5050
--sab 192.168.1.3:8080
--trans 192.168.1.3:9999
--hp 192.168.1.3:8181
--plex 192.168.1.3:32400
JAIL2 192.168.1.4
--Apache 192.168.1.4:21 & :443
-----PHP
-----MySQL

Then you can forward ports to the .3 address in your router to services you need to get remote access via WAN.IP.ADDRESS:8080

Or

Do a reverse proxy with apache or nginx and then you only need port 80 and 443 opened, everything else passes around internally.
 

Jack828

Dabbler
Joined
Nov 11, 2020
Messages
16
I was on the same boat, and eventually settled for setting static IP addresses on each jail.
Now I connect via hostnames so I don't have to remember IP addresses, and I can leave it on DHCP (because we've got a few hundred available to us!).
(shameless self-plug) If you'd like to know how I did it I've written a how-to https://www.truenas.com/community/threads/how-to-access-jails-via-hostname-using-mdns.88988/ However I have not considered support for multiple services in the same jail, but you should be able to figure it out easily enough.

EDIT: Looks like this is configurable and you need to enable "NAT Forwarding" within the jail config maybe?
 
Last edited:
Top