Solved [Solved] Internet on FreeBSD 10

Hello, I have installed FreeBSD 10-RC1 and configured the network with urtwn. So I ping my Wi-Fi router and I receive 100% response, also I do the same with the other computer on my network and same, all seems to work fine. The problem comes when I try to connect to the Internet, for example if I do portsnap fetch update it does not find any mirrors, the public key failed and finally it gives up. I do not know why it does not connect to the Internet. Can anyone help me please?
 
Re: Internet on FreeBSD 10

You've already checked if you have IP connectivity, now it's time to verify if name resolving works.

host [url=http://www.freebsd.org]www.freebsd.org[/url] should return a valid IP address. If it doesn't you need to adjust /etc/resolv.conf.
 
Re: Internet on FreeBSD 10

SirDice said:
You've already checked if you have IP connectivity, now it's time to verify if name resolving works.

host [url=http://www.freebsd.org]http://www.freebsd.org[/url] should return a valid IP address. If it doesn't you need to adjust /etc/resolv.conf.

Thanks for the reply. When I do ping 8.8.178.110 it works fine but I do not know why there was not any /etc/resolv.conf on my system so I created it and added:

Code:
8.8.178.110         freebsd.org

Now when I do ping freebsd.org I still no get reply and cannot resolve it. So I added to /etc/hosts:
Code:
8.8.178.110          freebsd.org
177.78.188.240     portsnap.freebsd.org

Now when I do ping [url=http://www.freebsd.org]http://www.freebsd.org[/url] it works but portsnap fetch update still does not work. It cannot connect and download the ports.
 
Re: Internet on FreeBSD 10

You still need to add a name server. Find out from your ISP what the numbers are for theirs. It is generally best to use those, but you can use others, like Google's for example. In which case your /etc/resolv.conf would look like this:
Code:
nameserver   8.8.8.8
 
Re: Internet on FreeBSD 10

adripillo said:
So I added to /etc/hosts:
Code:
8.8.178.110          freebsd.org
177.78.188.240     portsnap.freebsd.org
/etc/hosts really is more for the local network. Using it for the entire Internet is quite infeasible, which is exactly what DNS is for. As said by @OJ, you need to tell the system a nameserver to use, which would typically be provided by your ISP. In my case at home I use DHCP, which sets the nameserver in /etc/resolv.conf to the (local) IP address of my modem/router/firewall, which in turn forwards everything to my ISP's nameserver(s).
 
Last edited by a moderator:
Re: Internet on FreeBSD 10

fonz said:
adripillo said:
So I added to /etc/hosts:
Code:
8.8.178.110          freebsd.org
177.78.188.240     portsnap.freebsd.org
/etc/hosts really is more for the local network. Using it for the entire Internet is quite infeasible, which is exactly what DNS is for. As said by @OJ, you need to tell the system a nameserver to use, which would typically be provided by your ISP. In my case at home I use DHCP, which sets the nameserver in /etc/resolv.conf to the (local) IP address of my modem/router/firewall, which in turn forwards everything to my ISP's nameserver(s).


Yes, it is working now. Finally I can use FreeBSD on my new computer. Thanks all for the help.
 
Last edited by a moderator:
Back
Top