SOLVED Jail cannot access internet / no dans after IP Address & Subnet change

ericv

Explorer
Joined
Mar 21, 2015
Messages
56
My FreeNAS box used to have an IP address of 192.168.2.X (dhcp) and my plex and transmission jails used to be 192.168.2.2 and 192.168.2.3 respectively. The router had an ip address of 192.168.2.1.

I've made some network changes and now...

router = 192.168.1.1
freenas = 192.168.1.X
plex jail = 192.168.1.101
transmission jail = 192.168.1.102

Since I've made this change my jails do not have access to the internet.

When I ssh into freeness I can ping both 8.8.8.8 and google.com.
When I ssh into my jails (either one) i can ping 8.8.8.8 but not google.com

I'm not a jails expert, but it sounds like there might come config file I don't know about that needs updating?

I've searched the forums and all I can find is this, but there isn't a good solution.
https://forums.freenas.org/index.ph...nge-and-no-internet-access.27431/#post-176156
 

ericv

Explorer
Joined
Mar 21, 2015
Messages
56
Ok, so after 2 hours of searching and trying to figure this out I decide to make this post. Then in about 1 minute I figure out I need to manually update the following file for each jail...

/etc/resolv.conf
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Or you could have just changed the jails network configuration on the jail tab to match your network settings.
 

ericv

Explorer
Joined
Mar 21, 2015
Messages
56
Or you could have just changed the jails network configuration on the jail tab to match your network settings.

I tried that in about the first 3 minutes. It didn't work. I updated the "IPv4 default gateway" to the new address (192.168.1.1) and restarted the jail. No luck. I even restarted the FreeNAS server. The /etc/resolv.conf file was still referencing the old address.
 

ericv

Explorer
Joined
Mar 21, 2015
Messages
56

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
That's good to know, thanks for the update.
 
Joined
Apr 14, 2015
Messages
1
I'm experiencing some strange behavior for a couple of weeks now which seems to be related. I did the same thing as ericv. I changed the global network configuration and suddenly all of my jails lost internet connectivity. I quickly found out that `resolv.conf` was the source of the problem: While the global `resolv.conf` perfectly reflected the DNS settings I typed into the GUI, the only entry in the jails' `resolv.conf` was the IPv6 Link Local address of my gateway router. I never set it up like this!

I ended up doing the same thing as ericv: I manually copied `/etc/resolv.conf` to `<jails-root>/<jail>/etc/resolv.conf`. So far so good.

But after restarting any of my jails, the jail's `resolv.conf` gets overwritten with rubbish again! I have no idea at which point this happens. After a reboot of the whole system I have to manually copy the global `resolv.conf` to all of my jails in order to get connectivity. The fact that the file only contains a single IPv6 Link Local address leads me to think it has something to do with IPv6 autoconf stuff. It looks like something is generating this faulty `resolv.conf` files during jail startup.

UPDATE: It seems as if IPv6 was indeed the problem. At some point I discovered strange values in the jails' IPv6 settings. I did the following in the settings (GUI) of each jail to resolve this:
1. Deactivate IPv6 autoconf (checkbox)
2. Clear all fields related to IPv6
3. Apply all changes
4. Reactivate IPv6 autoconf

I manually restored the jails' DNS settings one more time and from there everything was fine. Sadly, I wasn't able to reproduce the previous condition so I cannot tell what caused the problem in the first place.
 
Last edited:

balrog76

Dabbler
Joined
Jul 25, 2015
Messages
10
Any news on this one? I have same problem. Only I don't seem to be able to get the workaround to work. And looks like the bug report states that it's "not to be fixed"........... Second time I run into a "not to be fixed" dealbreaker bug on this "stable" release :D Good thing it's not meant for professional use....oh wait...
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, your post isn't useful for even seeing what your problem is... and what I mean is that LOTS of things can cause a jail to have no network connectivity. So without you providing info showing your network configuration on the FreeNAS box, inside the jail, etc then there's no diagnosis.

I will say if you change your subnet and IPs then you are going to have to change the networking in the jail yourself, manually. Or destroy the jail and recreate it so FreeNAS creates the jail using the new subnet and such. Of course, you can have lots of other problems that aren't described in this thread, so you may have more than just the issue I mentioned.
 

erez

Dabbler
Joined
Sep 20, 2015
Messages
17
Hi Cyberjack,
I am new to both FreeNAS. I have setup a jail (ifconfig below) and from the shell terminal within FreeNAS i can ping my entire network but can not ping external IP addresses. I have read the manual as well as several posts. Your kind assistance is greatly appreciated. Gateway 10.1.1.1, FreeNAS 10.1.1.10, Jail 10.1.1.11

Thanks

root@Cloud:/ # ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:b1:93:00:0b:0b
inet 10.1.1.11 netmask 0xffffff00 broadcast 10.1.1.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
 

verinas

Dabbler
Joined
Mar 29, 2016
Messages
34
If you follow the standard VPN install guides there is no step to add a route for the DNS.

Type /sbin/route add <DNS IP> <GATEWAY IP>

Example:
[root@freenas] ~# /sbin/route add 8.8.8.8 192.168.1.1
add host 8.8.8.8: gateway 192.168.1.1
[root@freenas] ~# /sbin/route add 8.8.4.4 192.168.1.1
add host 8.8.4.4: gateway 192.168.1.1

fixed a similar issue for me.
 

soulburn

Contributor
Joined
Jul 6, 2014
Messages
100
Ok, so after 2 hours of searching and trying to figure this out I decide to make this post. Then in about 1 minute I figure out I need to manually update the following file for each jail...

/etc/resolv.conf
Thanks! I had this problem today after changing my jail subnet and nothing worked (including the jail network config change in the GUI) until I made the change to /etc/resolv.conf
 

Slovak

Explorer
Joined
Sep 10, 2013
Messages
62
Same issue for me, updating /etc/resolv.conf and restart jail made it all work.
 
Top