Changed ISP provider, jails cannot connect to internet

Status
Not open for further replies.

Colly222

Dabbler
Joined
Dec 31, 2014
Messages
24
Hi all,

Apologies in advance as I'm a proper noob. I have a NAS box that I basically just use as a plex server.

I've changed ISP and therefore all the domain has changed from 192.168.1.X to 192.168.0.X. The NAS changed it's own IP and I changed 'nameserver 1:' in 'global' to the new router IP.

Doesn't work though. My reading suggested that I needed to amend the resolv.conf in each jail. I've done this by 'vi resolv.conf' in the shell of the jail and then amending the line 'nameserver...' Cannot ping from the root though. I've tried "ping www.google.com"

Sorry, anyone taking pitty on me and letting me know how to fix would be great. Basic child steps would be really appreciated.

As a side note, I thought I would restart the Plex plugin but I cannot get anything to display on the Plugin tab of the GUI

Thanks
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Hello. What it seem to have changed was the LAN IP on your new ISP router. Maybe will be easier to just change it in your router and leave your previous configuration the way it is - if not too late.

One word of advise: If that's also feeding cable TV boxes, changing the LAN IP address will cause your TV services to stop working, so if that's the case, don't make any of the changes I'm suggesting (i.e. u-verse, DTV, etc).

Basically the router has a DHCP server working on a range inside the new 192.168.0.0/24. Take a look how to change that to 192.168.1.0/24 (The /24 here means a subnet mask of 255.255.255.0). 9 times out of 10 the router IP will be either the 192.168.x.1 or the 192.168.x.254, so when changing it you will need to renew your IP to get the new setting on your PC.

Assuming you are running windows, open the command prompt, type
ipconfig /release
than type
ipconfig /renew
to get a new IP.
Check your default gateway (your router's IP) with
ipconfig

You will get something like:

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\mello>ipconfig

Windows IP Configuration


Ethernet adapter Local Area Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter Local Area Connection* 2:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : mello.com
Link-local IPv6 Address . . . . . : fe80::f56f:4774:e60a:308%7
IPv4 Address. . . . . . . . . . . : 10.10.10.20
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.10.10.1 <<---- That's my router's IP

Tunnel adapter isatap.mellointernet.us:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : mello.com

Tunnel adapter Local Area Connection* 3:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :





Also will be nice to understand how you have setup your network. Is your FreeNAS on a static IP? Is that setup on your router or on the FreeNAS box itself? Your Plex IP configuration (staitc or DHCP)? What's your ISP and equipment they've provided? What is the FreeNAS version you are running?
 

Colly222

Dabbler
Joined
Dec 31, 2014
Messages
24
Thank you for getting back to me. I'm in the UK and have changed to Virgin Media. The DHCP range is restricted so I cannot change it.
NAS box isn't on a static IP but previous rounter always gave it the same IP and I think the jails all had IP addresses before the starting local IP. i.e. The router used to hand out from 192.168.1.10 onwards, and the jails were all 192.168.1.1 to 192.168.1.10

FreeNAS version is 9.10.1.

Any more thoughts??

This is what is currently in one of the jails. The IP of the name server is my old router

# Generated by resolvconf
search home
nameserver 192.168.1.254
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Don't know UK devices - somebody from there might be able to help better. The reason for the FreeNAS and jails always get the same IP is because the relationship betweeh the DHCP server and clients try to keep the same IP if available, so not a good thing if you are running servers, as if it goes down for some time and another client takes that IP, your server's IP will change.

I have a similar situation in US as my provider run the TV boxes on a static IP range and will take a lot to change, so I setup a second router behind the ISP one, configured it on DMZ. Maybe that a good solution for you, so you will have full control of your network. Maybe an opportunity to play with pfSense as well :)
 

Colly222

Dabbler
Joined
Dec 31, 2014
Messages
24
I'm probably over complicating this and then combining it with my lack of knowledge to say the wrong things so how about this.

I've changed ISP, so the LAN IP has changed. What do I need to do to FreeNAS to make it work? I rebooted the box (HP Proliant Server) and it changed from it's old IP 192.168.1.X to a new one. 192.168.0.X. It all looks ok but I don't think any of the plugins can connect to the internet. I'm assuming this as the list of available plugins on the 'plugin' tab is blank.

Reading suggests I should be able to ping www.google.com from the Shell but I get this:

[root@freenas ~]# ping www.google.com
ping: cannot resolve www.google.com: Host name lookup failure

Can ping 8.8.8.8 though:

[root@freenas ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=55 time=29.923 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=35.945 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 29.923/32.934/35.945/3.011 ms

Does that help anyone help me??

Thanks again for any efforts. I know I'm very low on knowledge
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
As I don't have my servers with me, installed on a VM to show:

Setting your FreeNAS to Static IP

upload_2016-12-17_14-59-25.png


To set your IP you can to from the console as above.

- Select option 1
- Answer "n" to reset configuration
- Answer "n" for DHCP
- Answer "y" for IPv4
- Give the same name as before (em0 in my case)
- Enter the static IP you want to assign (I've used 10.10.10.42 as it is outside of my DHCP. You will use 192.168.0.xxx)
- Enter 255.255.255.0 as netmask

Setting your default gateway

upload_2016-12-17_15-3-53.png


- Select 4
- Answer "y" for IPv4 Default Route
- Type your router IP Address (mine is 10.10.10.1, yours something like 192.168.0.xxx)
- Answer "n" for IPv6

Configure your DNS

Use option 6 and type the same IP for your router

Note I'm not using IPv6, so that's the reason I'm not configuring it.
 
Last edited:

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
ping: cannot resolve www.google.com: Host name lookup failure

Your DNS is not set correctly. Follow above or change it in the GUI -> Network -> Global Configuration -> Name Server 1. Use your router or a freeone (i.e.: 8.8.8.8)
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
For your jails ...

upload_2016-12-17_15-27-59.png


1) Select the jail
2) Click Edit Jails
- Uncheck IPv4 DHCP if checked
3) Set the jail ip
- Use an IP outside the range your DHCP is providing to avoid conflicts in the future
4) Set your IPv4 Default Gateway (Your router's IP most likely)

Note: If you don't see that screen when selecting Edit Jails, click the Advanced Mode.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
This is what is currently in one of the jails. The IP of the name server is my old router

# Generated by resolvconf
search home
nameserver 192.168.1.254
Is that address your new default gateway?
 

Colly222

Dabbler
Joined
Dec 31, 2014
Messages
24
Thank you for all the help. Looks like it's all back and working now. For the record, here's what I did:
set the static ip
set the default gateway
set the DNS (option 6)

I didn't notice the last post about setting the jail IP but I'd already done this without setting the default gateway

I then amended the resolv.conf inside each jail to match the main one found in the freenas build (if that makes any sense). No idea if this was needed but that's what earlier research suggested to do

All seemed to work.
Then went back and set all the default gateways once I'd seen the post.
All seems to work again.

I can now ping www.google.com from inside all the jails. (except the transmission one but I'll work that out later)

Properly test it all tomorrow but looks really positive. Thanks again, amazing advice.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
I didn't notice the last post about setting the jail IP but I'd already done this without setting the default gateway

LOL. It took me some time to install the VM and jails to capture the screens, so posted as I did. Also tested to make sure was working (I did forget the DNS and added later). Glad it worked.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Nope, that was the old one. That was the resolv.conf file that was in all the jails. it's the part I amended
Amended to what? Your default gateway I hope.
 

Colly222

Dabbler
Joined
Dec 31, 2014
Messages
24
Amended to what? Your default gateway I hope.
Sorry, been away. So I originally amended the resolv.conf in each jail to match the main one that I was seeing in Freenas (when I first changed ISP and before I followed @melloa helpful advice). However, when I did the steps above, the main file changed. I can still ping from the OLD jails, but not any I've updated.

To be clear, I originally amended the resolv.conf to this:
# Generated by resolvconf
nameserver 194.168.4.xxx
nameserver 194.168.8.100

That all worked fine. Then when I did the above, the main resolv.conf in Freenas changed to:

search local
nameserver 192.168.0.x (this is the IP of my router/my default gateway)

I changed a couple of the jails again to match that, but now none of the ones with the newly amended resolv.conf can ping www.google.com. The ones with the first configuration can.

I always try to research first before asking but I'm stuck again. Any thoughts please?? Is it as simple as using the first configuration? (no idea where that came from)
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Did you restart the jails after you made the changes?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Then I got nothing, maybe someone else can step up and help out. The address in resolve.conf should be your default gateway address and if that doesn't work after restarting I'm out of ideas.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
What is 192.168.4.xx?

What is 192.168.8.100?

Do those IP addresses actually exist within your network? You say you're running a 192.168.0.x.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
@Colly222

Test with your FreeNAS interface set to DHCP. Mine is and the jail configuration is set for DHCP as well:

upload_2016-12-22_0-56-4.png


I've created a test jail also set for DHCP:

upload_2016-12-22_0-57-31.png


and works fine:

upload_2016-12-22_0-58-6.png


Even the little bug we had before, where you'd need to type the word DHCP inside the IPv4 address field, before been able to check the IPv4 DHCP box, seems to be fixed.

If that test works, the only thing you need to do is fix your IPs in your router, so won't change in the future (sorry don't even know where to start with your router to try to help).

If that won't work, I'm afraid it will be out of what I can help and will require someone with more FreeNAS/FreeBSD knowledge to troubleshoot with you.

Good luck!
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
And by the way:

Running: FreeNAS-9.10.2 (a476f16)

root@test:/ # cat /etc/resolv.conf
# Generated by resolvconf
search mydomain.com
nameserver 10.10.10.1 <- that's my router

root@test:/ # ifconfig
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 86:3c:67:e8:4e:03
inet 10.10.10.136 netmask 0xffffff00 broadcast 10.10.10.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
root@test:/ # ping www.google.com
PING www.google.com (216.58.219.164): 56 data bytes
64 bytes from 216.58.219.164: icmp_seq=0 ttl=51 time=36.308 ms
 
Status
Not open for further replies.
Top