Solved No internet access after install (I had it while installing)

So I just installed FreeBSD in Dual Boot with Windows 10 and everything was fine during the install and during the install it downloaded the files it needed I have a wi-fi connection by the way. I looked at wpa_supplicant.conf and everything was right and I look at resolv.conf and here is what I have:
# nameserver 192.168.1.1
# nameserver 192.168.7.1
nameserver 127.0.0.1
options edns0


When I ping my router (192.168.7.1) it works.
When I ping my modem (192.168.1.1) it works.
When I ping 127.0.0.1 it works.
When I ping google.com: ping: cannot resolve google.com: Host name lookup failure

And I am sure it's not my internet I am using it right now while writing this (on Windows 10).
My wi-fi card is an atheros ar5bwb222.
 
Check your default route with netstat -rn
This is what I got:
r8LgHgR.png
 
So I just installed FreeBSD in Dual Boot with Windows 10 and everything was fine during the install and during the install it downloaded the files it needed I have a wi-fi connection by the way. I looked at wpa_supplicant.conf and everything was right and I look at resolv.conf and here is what I have:
What happens when you ping Google (8.8.8.8)?

The error you got indicates that this has to be a DNS related problem. Check if those resolvers can actually resolve IP addresses.

(edit)

Comment out 127.0.0.1 and re-enable the 192* lines again in /etc/resolv.conf. That should fix it.
 
What happens when you ping Google (8.8.8.8)?

The error you got indicates that this has to be a DNS related problem. Check if those resolvers can actually resolve IP addresses.
8.8.8.8 works.

ShelLuser said:
Comment out 127.0.0.1 and re-enable the 192* lines again in /etc/resolv.conf. That should fix it.
I did it and reboot. Now when I ping google it works but only the first time when I do it again I get: ping: cannot resolve google.com: Unknown server error
 
I did it and reboot. Now when I ping google it works but only the first time when I do it again I get: ping: cannot resolve google.com: Unknown server error
Ok, then there's nothing wrong with your Internet connection but for some reason /etc/resolv.conf gets overwritten. My assumption is that your system is using DHCP which then does this.

You got a few options. First you can chose to enable unbound(8). This is a local DNS resolver / cacher. This will enable your machine to do host lookups and thanks to the caching this can also actually speed things up a little. In order to enable this simply add: local_unbound_enable="YES" to your /etc/resolv.conf /etc/rc.conf file (apologies for the typo, got my config files mixed up there). Then issue # service unbound start (from the top of my head anyway, rebooting will always work but is a bit drastic).

The other option is to tell your DHCP client that it should not update the DNS servers in resolv.conf. This can be done by editing /etc/dhclient.conf. See dhclient.conf(5) for more information on this. But since I'm typing anyway... supersede domain-name-servers 192.168.7.1 should be enough to fix that.
 
The other option is to tell your DHCP client that it should not update the DNS servers in resolv.conf. This can be done by editing /etc/dhclient.conf. See dhclient.conf(5) for more information on this. But since I'm typing anyway... supersede domain-name-servers 192.168.7.1 should be enough to fix that.

local_unbound was already enabled then I tried this and it worked and so far I am still online. I am writing this from Firefox on FreeBSD by the way. Thanks.
 
local_unbound was already enabled then I tried this and it worked and so far I am still online. I am writing this from Firefox on FreeBSD by the way. Thanks.
Happy to know that it worked out for you!

Don't forget that you can disable local Unbound if you want to save a bit of memory. Or you could go over its configuration to check why it didn't work in the first place. See also unbound.conf. Because if Unbound had worked then you wouldn't have had any problems in the first place.

Even so, you're online and that's all which matters now :)
 
See also unbound.conf. Because if Unbound had worked then you wouldn't have had any problems in the first place.
This is what I had in my unbound.conf file. Is anything wrong there?
Code:
# This file was generated by local-unbound-setup.
# Modifications will be overwritten.
server:
   username: unbound
   directory: /var/unbound
   chroot: /var/unbound
   pidfile: /var/run/local_unbound.pid
   auto-trust-anchor-file: /var/unbound/root.key

include: /var/unbound/forward.conf
include: /var/unbound/lan-zones.conf
include: /var/unbound/control.conf
include: /var/unbound/conf.d/*.conf
 
Back
Top