Home > Archive > Linux/Unix > June 2002 > Hostname and Domain name





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Hostname and Domain name
Boulware5

2002-06-17, 2:37 pm

When I change my hostname and domain name using the hostname [localname] and the domainname [nisname] commands, it changes it only for that session. So when I reboot and come back it's back to where it was before. Is there some configuration file I need to put this in to make the change permanent?
The VMS Kid

2002-06-17, 3:04 pm

Use linuxconf or netconf to change the hostname permanently.
ccieToBe

2002-06-17, 6:28 pm

You could also edit /etc/hosts
Boulware5

2002-06-17, 9:09 pm

What would I put in /etc/hosts?

What I did was put the following:

127.0.0.1 host.domain.net host

Not host.domain.net host literally. I replaced that with what I wanted my host and domain to be.

Now if this IS right and it should work - which it don't - it's possible this loopback address could be blocked. I installed portsentry rececntly and to play with it I have nmap'ed myself which may have blocked 127.0.0.1. Or maybe my /etc/hosts file is wrong. Opinions?
Boulware5

2002-06-17, 10:00 pm

Correction: That did change my hostname but not my domain-name.
Boulware5

2002-06-18, 12:08 am

Nevermind, after some research I got it by editing /etc/sysconfig/network.
ccieToBe

2002-06-18, 7:43 pm

Hehe, glad to hear you got everything working.

Btw, portsentry has a config file (can't recall the name off the top of my head) where you can list IPs and/or subnets that you don't want blocked. By default 127.0.0.1 is listed. It would be a good idea to list the rest of the addresses used by your interfaces as well as other important addresses like your DNS servers to prevent someone from DOSing you with spoofed packets.
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net