need help in Hostname management

Taking care of your Linux box.
Post Reply
passwd
Cadet
Posts: 1
Joined: Wed Jan 14, 2004 9:26 am
Contact:

need help in Hostname management

Post by passwd »

hi can anybody help me about hostname management

i want to add domain name in my linux box. how can i add domain with changing DNS of domain and add it in my box ....

pls reply me in details.

waiting for help
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re: need help in Hostname management

Post by LinuxFreaK »

Dear passwd,
Salam,
passwd wrote:i want to add domain name in my linux box. how can i add domain with changing DNS of domain and add it in my box ....
I don't know why all pakistani people want to be spoon feeding.... any way all you need to install bind pakage :)

edit you /etc/named.conf

# vi /etc/named.conf

Code: Select all

// generated by named-bootconf.pl
options {
directory "/var/named";
check-names master warn;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
zone "linuxpakistan.net" in {
type master;
file "db.linuxpakistan";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};
zone "." in {
type hint;
file "db.cache";
}; 
after that make file /var/named with name db.linuxpakistan (whatever your domain name) and open it with vi editor

# touch /var/named/db.linuxpakistan
# vi /var/named/db.linuxpakistan

Code: Select all

$TTL 86400 ; minimum TTL as of bind 8.2
<domain name>. IN SOA <primary name server>. <email>.<domain name>. (
1999122601 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day

<domain name>. IN NS ns1.linuxpakistan.net.
<domain name>. IN NS ns2.linuxpakistan.net.

<domain name>. IN RP <email>.<domain name>. <email>.<domainname>.

localhost.<domain name>. IN A 127.0.0.1
<domain name>. IN A <ip address>.
<domain name>. IN MX 0 <mail server>.
*.<domain name>. IN CNAME <domain name>.
hope it will help you and finally if you serach at forum then i am sure that you can find that your question already answered :)

http://www.linuxpakistan.net/forum2x/vi ... .php?t=774

Best Regards.
Farrukh Ahmed
Post Reply