PDA

View Full Version : /etc/hosts + dynamic IP


borromini
2004-12-31, 03:53 AM CST
Hi guys, I have a question. Every time a user logs on to my Fedora Core 3 installation, GNOME displays an error message saying it can't find my pc in the hosts file and suggesting to add it to that file. Now I have been trying to do that, but I can't get an IP adress. I've tried 'ifconfig' in the terminal, but it says 'unknown command'. I have done this both as ordinary user and as root. So without an IP address( which by the way is dynamic), I can not add my computer to the /etc/hosts file, right? So what do I have to do?

Another question: in order to configure the default FC3 firewall correctly, do I have to select any services (for example http for web browsing), or is this only necessary for incoming traffic, and not for normal web surfing?

Thanks a lot

kosmosik
2004-12-31, 04:19 AM CST
Hi guys, I have a question. Every time a user logs on to my Fedora Core 3 installation, GNOME displays an error message saying it can't find my pc in the hosts file and suggesting to add it to that file.
configure your DHCP client (you can do it with network tool) to not to use hostname from DHCP... then your hostname will be simply localhost (you can change it by adding an alias to /etc/hosts file "127.0.0.1 localhost.localdomain localhost yourhostname" and changing settings in /etc/sysconfig/network - "HOSTNAME=yourhostname"

Now I have been trying to do that, but I can't get an IP adress. I've tried 'ifconfig' in the terminal, but it says 'unknown command'. I have done this both as ordinary user and as root. So without an IP address( which by the way is dynamic), I can not add my computer to the /etc/hosts file, right? So what do I have to do?

try /sbin/ifconfig... aparently this command is not in your PATH.

Another question: in order to configure the default FC3 firewall correctly, do I have to select any services (for example http for web browsing), or is this only necessary for incoming traffic, and not for normal web surfing?
this firewall is only for incoming traffic. so you can block everything - browsing from your machine will work.

DRE.ORGY.NET
2004-12-31, 11:21 PM CST
if you using su to gain root privilages then try doing an "su -" instead as by default fedora core 3 does not put /sbin/ in a normal users path.

borromini
2005-01-03, 04:30 AM CST
Ok, it worked :). Thanks for the help, guys!

kbrown
2005-04-23, 06:30 PM CDT
lol... why didn't anyone tell me you can right click on the eth0 entry in the network tool :D

Been trying to solve this same issue for few hours now and finally got it after I read this... I feel so stupid ;)