useless system

Status
Not open for further replies.
The /etc/resolv.conf is a configuration file, not an executable. Use an editor (I suggest using ee(1) as vi(1) will probably be too difficult).
First have a look at its content, this is a small file so you can simply do cat /etc/resolv.conf.
 
The /etc/resolv.conf is a configuration file, not an executable. Use an editor (I suggest using ee(1) as vi(1) will probably be too difficult).
First have a look at its content, this is a small file so you can simply do cat /etc/resolv.conf.

# Generated by resolvconf
# nameserver 192.168.0.1

nameserver 127.0.0.1
options edns0
 
And there it is: your nameserver should be your router/gateway, not localhost. Change the nameserver entry to be the IP address of your gateway, which I believe is 192.168.0.1
 
Hi there,

how do I do that?

Kind regards
Nick
HI Mate

You need to edit the /etc/resolv.conf and comment out nameserver 127.0.0.1 and uncomment nameserver 192.168.0.1

There are lot of text editors to edit the file but i would suggest using nano,
i have never used ee

Beginner guide to using nano

Bash:
sudo pkg install nano

Enter you admin password, then press y to install nano

Then you need to edit the /etc/resolv.conf file

Code:
sudo nano /etc/resolv.conf

use the arrow keys and move the cursor one space after # before nameserver 192.168.0.1,
and press the delete key to delete the # character

then use the arrow keys to move down and add the # character before nameserver 192.168.0.1

next we need to save the file by holding the control key and pressing the letter o,
then we close the file by pressing control and the letter x

The file should look like this

Code:
# Generated by resolvconf
nameserver 192.168.0.1

#nameserver 127.0.0.1
options edns0

Finally you need to restart networking to pick up the changes in the resolv.conf file

restart networking

Bash:
sudo service netif restart

And you should be all set
 
No need to install nano - ee is already on the system but really OP's preference. Ee is just as simple as nano. Same interface.

And just an FYI note: nano is from the Linux world and not native to FreeBSD. Doesn't mean it's bad, but if a user relies on a ported app that isn't in base, then they are stuck if that port is not on the system for whatever reason.
 
Especially since the OP doesn't have any internet access that would allow him to install new packages.

Code:
sudo ee /etc/resolv.conf

Will do the trick. Then you can do like @NapoleonWilson suggested with the arrow keys etc... to edit the file.
When you are done editing the file, use the ESCAPE key of your keyboard to show the menu that will allow you to leave the editor while saving your changes.
 
Especially since the OP doesn't have any internet access that would allow him to install new packages.

Code:
sudo ee /etc/resolv.conf

Will do the trick. Then you can do like @NapoleonWilson suggested with the arrow keys etc... to edit the file.
When you are done editing the file, use the ESCAPE key of your keyboard to show the menu that will allow you to leave the editor while saving your changes.

I managed to do it with ee. I then installed firefox. when i try to open it i get
unable to init server: could not connect to 127.0.0.1: Connection refused

(firefox:3283): Gtk-WARNING **: 19:17:40.376: cannot open display
 
So now you have internet, congratulations!

The next step is to install and configure the X server, it should be quick if your hardware is supported, then once this is done you should have no problem to run firefox. You can see the handbook for detailed instructions:

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x11.html

I have done pkg install xorg and am currently waiting for pkg install gnome3 to finish. It's been going for the last 10 minutes or so. I'm keeping all fingers and toes crossed it does the trick.
 
I have done pkg install xorg and am currently waiting for pkg install gnome3 to finish. It's been going for the last 10 minutes or so. I'm keeping all fingers and toes crossed it does the trick.
Make sure to follow the steps in the handbook about gnome,
setting up proc in fstab, D-Bus, HAL, GDM in rc.conf,
and gnome session in xinitrc
 
I think there was nothing "wrong" in the configuration of the system. Given the content of /etc/resolv.conf, it seems that the OP uses local-unbound(8). To verify this, check the presence of the following line in your /etc/rc.conf.
Code:
local_unbound_enable="YES"

If I am right, then my guess is that the DNS servers used by the OP do no use DNSSEC (you can run a test here : https://dnssec.vs.uni-due.de/). By default, local-unbound.conf(5) comes with the line
Code:
auto-trust-anchor-file: /var/unbound/root.key
If I remember correctly, when this line is present but the DNS is not configured for DNSSEC, it will not resolve adresses. My advice is to put your /etc/resolv.conf back the way it was and comment the line above in /etc/unbound/unbound.conf.

As a side note, if local-unbound(8) is enabled, it will erase the modification you made to /etc/resolv.conf during the next reboot (and you will lose internet again).
 
Last edited by a moderator:
I think there was nothing "wrong" in the configuration of the system. Given the content of /etc/resolv.conf, it seems that the OP uses local-unbound(8). To verify this, check the presence of the following line in your /etc/rc.conf.
Code:
local_unbound_enable="YES"

If I am right, then my guess is that the DNS servers used by the OP do no use DNSSEC (you can run a test here : https://dnssec.vs.uni-due.de/). By default, local-unbound.conf(5) comes with the line
Code:
auto-trust-anchor-file: /var/unbound/root.key
If I remember correctly, when this line is present but the DNS is not configured for DNSSEC, it will not resolve adresses. My advice is to put your /etc/resolv.conf back the way it was and comment the line above in /etc/unbound/unbound.conf.

As a side note, if local-unbound(8) is enabled, it will erase the modification you made to /etc/resolv.conf during the next reboot (and you will lose internet again).

Well gentleman,

it's been 8 and a half hours, multiple smoke breaks, and 5 weeks in total if you include all the time I have tried to do this on my own, but, I now have a fully functional system with gnome desktop and all that comes with it. I just wish I had tried asking here 5 weeks ago instead of struggling to the point of almost throwing the towel in.

Well gents (and ladies) I cannot express how greatful I am for all the advice today.

I am now off to go and peruse my new desktop and see what wonderful utilities it comes with.

Many thanks and kind regards,
Nick
 
Bash:
sudo pkg install nano

Your intentions were good, but this really made me laugh so hard. Talking about a chicken-and-egg problem. You need nano to fix your network issues, but you need network connectivity to install nano.

I think there was nothing "wrong" in the configuration of the system. Given the content of /etc/resolv.conf, it seems that the OP uses local-unbound(8). To verify this, check the presence of the following line in your /etc/rc.conf.
Code:
local_unbound_enable="YES"

If I am right, then my guess is that the DNS servers used by the OP do no use DNSSEC (you can run a test here : https://dnssec.vs.uni-due.de/). By default, local-unbound.conf(5) comes with the line
Code:
auto-trust-anchor-file: /var/unbound/root.key
If I remember correctly, when this line is present but the DNS is not configured for DNSSEC, it will not resolve adresses. My advice is to put your /etc/resolv.conf back the way it was and comment the line above in /etc/unbound/unbound.conf.

As a side note, if local-unbound(8) is enabled, it will erase the modification you made to /etc/resolv.conf during the next reboot (and you will lose internet again).

I checked my laptop on which I installed FreeBSD 11.2 a few weeks ago and indeed, I also modified my /etc/resolv.conf to use other name servers so I could browse the Interwebs while I have local_unbound_enable="YES" in /etc/rc.conf. However, rebooting my laptop did not reset my /etc/resolv.conf so I guess I was a bit lucky there. Either way, I will "fix" my setup by commenting the line auto-trust-anchor-file: /var/unbound/root.key.
 
so I guess I was a bit lucky there
Or, I guess I was wrong. I would have bet (and lost) 100€ on that. May be that was dhclient(8) that modified my /etc/resolv.conf at reboot then. I can't remember. Anyway, thank you for correcting that point.
 
it's been 8 and a half hours, multiple smoke breaks, and 5 weeks in total if you include all the time I have tried to do this on my own, but, I now have a fully functional system with gnome desktop and all that comes with it. I just wish I had tried asking here 5 weeks ago instead of struggling to the point of almost throwing the towel in.
At least you learned a lot in that period, so it wasn't entirely useless. Even knowing how not to do things is valuable knowledge. Just take things step by step. Don't try to cut corners, be methodical, and you'll be fine
 
I'm glad you persisted. 17 years ago (!) it took me over a week full-time setting up a Firewall/NAT box with FreeBSD but I have never regretted it.
It was my first Unix-like OS I actually used (as opposed to trying out) and it's been my main OS (server and desktop) ever since.
 
I checked my laptop on which I installed FreeBSD 11.2 a few weeks ago and indeed, I also modified my /etc/resolv.conf to use other name servers so I could browse the Interwebs while I have local_unbound_enable="YES" in /etc/rc.conf. However, rebooting my laptop did not reset my /etc/resolv.conf so I guess I was a bit lucky there. Either way, I will "fix" my setup by commenting the line auto-trust-anchor-file: /var/unbound/root.key.

I fixed that and I again have DNS resolving working. This time using my local unbound daemon. Thanks!
 
At least you learned a lot in that period, so it wasn't entirely useless. Even knowing how not to do things is valuable knowledge. Just take things step by step. Don't try to cut corners, be methodical, and you'll be fine

I think you've hit the nail squarely on the head. I've probably learnt more in one day dealing with problems than I would have in a week of reading some book. That said I've taken advice given here and decided to improve my knowledge of TCP/IP. I've purchased TCP/IP in 24hrs from amazon in an effort to get to grips with it. It looked like a decent book for a complete novice but if anyone here has any better recommendations I'm all ears.

As most of you have probably gathered, my knowledge of IT is old and shaky. If anyone here is a UK forum member you'll know what a GNVQ is. I did an AVCE (advanced GNVQ) about 20 years ago when assignments were handed in on 3 1/2 inch floppys, so as I'm finding most of what I know is redundant. VB6 which I was taught is now obsolete as is most of the hardware, and I've forgotten almost every HTML tag and line of javascript I've ever typed.

I've started from scratch and am relearning the hardware with a raspberry pi and a few arduinos. I've dabbled in Python and C and am currently having a mess about with assembly for the r-pi.

The networking stuff seems to elude me still as it did 20 years ago so you may find me here asking more questions when my book arrives.

Regards,
Nick
 
If anyone here is a UK forum member

Hullo from South Wales! I did my AVCE in ICT back between 2004 and 2006, but did go off and get a CS degree. Still plenty of things I don't understand, and getting into FreeBSD wasn't buttery smooth for me, but now I'm here I'm extremely comfortable :)

That said I've taken advice given here and decided to improve my knowledge of TCP/IP. I've purchased TCP/IP in 24hrs from amazon in an effort to get to grips with it. It looked like a decent book for a complete novice but if anyone here has any better recommendations I'm all ears.

Personally, I found Networking for System Administrators invaluable. It approaches networking from someone who is familiar with the computer side of things, and somewhat assumes you just need to know enough to get on well with a Network Administrator and explain a problem. While it won't teach you all of the in and outs and edge cases, it does a good job of saying "here's some basic foundation stuff", then goes on to show you how to troubleshoot various parts of those foundations (but doesn't go into fixing them).
It may not be all that useful for someone who wants to know more, or who wants to create and administer their own network, but I certainly found it very useful :)

Congrats for getting a working machine!
Ben
 
That said I've taken advice given here and decided to improve my knowledge of TCP/IP. I've purchased TCP/IP in 24hrs from amazon in an effort to get to grips with it. It looked like a decent book for a complete novice but if anyone here has any better recommendations I'm all ears.

Using TCP/IP Special Edition by John Ray. 1999

Includes CD-ROM.
 
If anyone here is a UK forum member

Hi,

Also in the UK. Welcome to the forums and congratulations on choosing FreeBSD :)
You'll find this a very welcoming community, so long as you can show that you have done some of the legwork before asking your question.

With regards to books about TCP/IP, the canonical UNIX tome is probably TCP/IP Illustrated by Richard Stevens.
There is a second edition but most people seem to prefer the first edition.
I only have the first, so not sure what's been updated.
 
With regards to books about TCP/IP, the canonical UNIX tome is probably TCP/IP Illustrated by Richard Stevens.
That's definitely the best book if you really want to know all the ins and outs in excruciating detail. Maybe not so good for beginners, it might be a bit too advanced. Certainly a good read if you already know some of the basics. It's definitely a worthwhile investment, even if you only use it as reference.
 
Status
Not open for further replies.
Back
Top