ping and ifconfig not working on truenas scale, and resolv.conf looks weird?

alyflex

Dabbler
Joined
Jan 26, 2024
Messages
12
I setup a network bridge on my truenas scale server such that my VM on truenas scale would be accessible over tailscale, and at the same time I removed pihole from my apps and resumed to standard dns serving. But along the way I guess something went quite wrong and I have no idea how to fix this. My server is still responding fine on the local network, but does not seem to have any internet connection anymore and cannot see the apps catalogue anymore or update the operating system.

I am unable to run ping commands or ifconfig commands in the truenas scale shell, I get Name or service not known for both of those (maybe those are just not available on truenas scale by default I honestly can't remember)

As far as I understand I think I need to fix my resolv.conf file which currently says:
domain local
which I don't think is right?

What is the correct way to fix this file, do I manually overwrite it and with what? or is it supposed to be updated in some other way?
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Did you change the DNS server in truenas settings?

Please post the exact output of ping in code tags, both commands should be available.
 

alyflex

Dabbler
Joined
Jan 26, 2024
Messages
12
I don't believe I changed the dns server in the truenas settings, I think I kept it as it was.

1711467869883.png


Here is a screenshot of me trying both commands:

1711467973142.png
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Try ping 1.1.1.1

Your bridge IP is not on the same subnet as your router (under DNS settings) and also the netmask is /23, typical for home networks would be /24

Did you set pihole as the DNS in your router 192.168.1.1? Maybe restart the router although other devices can resolve DNS?
 

alyflex

Dabbler
Joined
Jan 26, 2024
Messages
12
ping 1.1.1.1 works just fine. The bridge IP was something my friend helped me set up, but I believe the idea was that it would be cleaner if the virtual machine lived on a different subnet. But I think I will try and revert that back such that everything lives on the same subnet as well to keep things simpler. Pihole was set as my DNS in my router 192.168.1.1 before, but I changed that back a few days ago, and all other computers seems to have had no problem with that part.

I will try and change everything back to the same subnet and see whether that helps fix the problem.
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Okay so you have Internet connectivity just no DNS resolution.

How does the routing work with the different subnet? From my perspective that's certainly not simpler than having it on the same subnet ;)

Is domain.local the only entry in your resolve.conf? It should also list your nameserver 192.168.1.1, try to to add that if it isn't there.

I wonder why the resolv.conf did not get updated. You could try and temporarily add 1.1.1.1 as a nameserver and see if it picks up on that. Or reboot your server.
 
Last edited:

alyflex

Dabbler
Joined
Jan 26, 2024
Messages
12
Okay so you have Internet connectivity just no DNS resolution.

How does the routing work with the different subnet? From my perspective that's certainly not simpler than having it on the same subnet ;)

Is domain.local the only entry in your resolve.conf? It should also list your nameserver 192.168.1.1, try to to add that if it isn't there.

I wonder why the resolv.conf did not get updated. You could try and temporarily add 1.1.1.1 as a nameserver and see if it picks up on that. Or reboot your server.
Sorry I didn't get back on this before now, I got swamped the last few days.

How routing works with subnets I don't actually know, but I'm also not really sure whether it is truly a different subnet since the mask is /23 so from my very limited understanding, shouldn't it still be one subnet spread over both 192.168.0.x and 192.168.1.x?

Regarding resolv.conf, domain.local is the only thing written in it at all, and I have never manually touched this file before, so I'm not sure how it ended up looking like that. I tried adding nameserver 192.168.1.1 to the file and rebooting, but it just changes the file to only have domain.local in it after reboot, so I guess I need to change this in a different way.

One key thing, is that the internet actually does work when I add nameserver 192.168.1.1 to resolv.conf! When this was added I was able to update my chart catalogs, so now I just need to figure out a way for that to persist through reboots.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You need to set the nameserver in Network > Global Configuration
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Did you change the DNS server in truenas settings?
You need to set the nameserver in Network > Global Configuration
Good catch! I somehow overlooked that there is no entry under nameserver in OPs screenshot, that's why I wondered why it didn't get carried over to resolv.conf... I misread that the IP was under Nameservers. But yes, what @Patrick M. Hausen described is what I meant.
 
Top