LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-27-2011, 02:52 AM   #1
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Rep: Reputation: Disabled
how to create and configure zones files?


hello all,

well i want to set up a test dns server in my system and for this i am not using any static ip,i will be using dhcp..

now i am stuck with creating the zones for the website so can anyone help me in it?and while configuring named.conf(as m not using a static ip),i gave the address that i have through dhcp?is that ok?

And is my configuration for names.conf file correct?

options {
listen-on port 53 { 127.0.0.1; 192.168.0.11.255 };
listen-on-v6 port 53 { ::1; };
directory "/var/named";

allow-query { localhost; 192.168.0.0/22 };
allow-query-cache { localhost;192.168.0.0/22 };
};

view localhost_resolver {
match-clients { localhost; 192.168.0.0/22; };
match-destinations { localhost; 192.168.0.0/22; };
recursion yes;
include "/etc/named.rfc1912.zones";
};

zone "localhost" {
type master;
file "localhost.zone";
};

zone "tashicell.bt" {
type master;
file "tashicell.bt.db";
};


I need your suggestion,guidance and help..

Thank You..
 
Old 10-27-2011, 02:58 AM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
http://www.linuxquestions.org/questi...server-906142/

try looking for your solutions
 
Old 10-27-2011, 03:58 AM   #3
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
well,
Code:
internet /DynIP -> DHCP -> server -> site
is for my opinion almost impossible.
At least your server should be static IP within your subnet (home network ...) having configured Gateway through your internet connection, like:
Code:
internet (dyn) -> router -> server (static)
 
Old 10-27-2011, 04:16 AM   #4
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by lithos View Post
well,
Code:
internet /DynIP -> DHCP -> server -> site
is for my opinion almost impossible.
At least your server should be static IP within your subnet (home network ...) having configured Gateway through your internet connection, like:
Code:
internet (dyn) -> router -> server (static)
is it not possible to fix the IP of user in dhcp through MAC
Through that way it should be possible?
 
Old 10-27-2011, 04:37 AM   #5
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
well Mr.Deepak,i have gone through that as i was the one to ask that last time..

well i want my system to act as a dns server(just to learn and see if it works),and for this is it necesssary to give a valid web address for it?i though it qould confilct so but anyway i can give a valid web address also..

and in /etc/hosts we need to give the ip of the machine followed by the hostname,here what does the hostname stand for?is it the website or what is it?
 
Old 10-27-2011, 04:44 AM   #6
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by SarahGurung View Post
well Mr.Deepak,i have gone through that as i was the one to ask that last time..

well i want my system to act as a dns server(just to learn and see if it works),and for this is it necesssary to give a valid web address for it?i though it qould confilct so but anyway i can give a valid web address also..

and in /etc/hosts we need to give the ip of the machine followed by the hostname,here what does the hostname stand for?is it the website or what is it?
As lithos said it is always better to use a static IP rather a dynamic one and honestly I have not tried with a DHCP IP for DNS.

and for host name is the name of your machine

for better results search on Google and m sure you'll get your answer
 
Old 10-27-2011, 05:09 AM   #7
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
ok now i ll be using static ip...can u please help me put now?
 
Old 10-27-2011, 05:14 AM   #8
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by SarahGurung View Post
ok now i ll be using static ip...can u please help me put now?
Code:
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
IPADDR 192.168.x.x
Code:
#vi /etc/hosts
192.168.x.x  localhost.localdomain   localhost
             (sarah.example.com)      sarah

in the localhost.localdomain give your hostname for eg manju.example.com

Code:
#vi /etc/sysconfig/network
HOSTNAME sarah.example.com
Code:
#hostname sarah.example.com
 
Old 10-27-2011, 05:31 AM   #9
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
well what i did was i have used that static ip in the named.conf and resolv.conf file but i havent used it in my system itself,i mean for the lan....or do you want me to use this static ip in the system also?

and the hostname of ny system is localhost.localdomain...i can change it as well right?..in you example you have given it as example.com and that looks like a website address....so m confused as to whether you are askin me to give the hostname of the system,or change the hostname of my system to sarah.example.com or whether to give the website?
 
Old 10-27-2011, 05:36 AM   #10
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by SarahGurung View Post
well what i did was i have used that static ip in the named.conf and resolv.conf file but i havent used it in my system itself,i mean for the lan....or do you want me to use this static ip in the system also?

and the hostname of ny system is localhost.localdomain...i can change it as well right?..in you example you have given it as example.com and that looks like a website address....so m confused as to whether you are askin me to give the hostname of the system,or change the hostname of my system to sarah.example.com or whether to give the website?
that really confused me
you have used static ip in named.conf and resolv.conf but not in your system?
now where do you want to configure DNS?

and regarding hostname as I said you should try google once
 
Old 10-27-2011, 05:43 AM   #11
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
oh yaya i got it....my mistake,hahaa....sorry for that...ya i did goole for hostnames,thats y i told you that we can cahnge it also....


My doubt is in your example you have given sarah.example.com in place of localhost.localdomain,so m asking you what should id do?u want me to change my hostname to sarah.example.com?
 
Old 10-27-2011, 05:46 AM   #12
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
no you can put any host name you want

Code:
server.sarah
sarahgurung
or whatever not at all matters as per your convenience

but for suitability try use a domain name with host name
Code:
sarah.example.com
 
Old 10-27-2011, 06:18 AM   #13
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
well Mr.Deepak i did as you said and gave sarah.example.com with the ip address in the /etc/hosts and in others also.....but in the /hosts the loopback addressia also there as:
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
what should i do?shall i replace the above localhost.localdomain wth that sarah one or remove the loopback address itself or leave it as it is?

and in cd sysconfig/network also:
HOSTNAME=localhost.localdomain
so out here also replace localhost.localdoamin wth sarah.example.com or add a new one?

please don't mind as i have been asking you a lot of times and that too such silly questions,please don't mind but million thanks as well...

Last edited by SarahGurung; 10-27-2011 at 06:22 AM.
 
Old 10-27-2011, 06:23 AM   #14
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
leave them at it is
just follow the instructions as it is said in hosts file and make a new entry

your_ip hostname

and replace the hostname with newone in sysconfig
 
Old 10-27-2011, 06:29 AM   #15
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
wow thanks,i did as u said now....what step should i be taking now?

And Mr.Deepak our lan uses private ip in the range of 192.168.11.X(dhcp)....so when i used the static ip i used 192.168.0.1 but since it isnt in our lan it isnt connecting to the internet or is something wrong with my system?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [SAMBA] How to track windows user access , create files /modify files on linux SMB efciem Linux - Server 2 05-16-2010 09:45 AM
Synchronizing DNS Servers - automatically create new zones assi Linux - Networking 3 03-21-2009 11:58 AM
bind9 zones config files help lucastic Linux - Server 1 09-25-2007 05:24 PM
Samba: "homes" share, cannot create directories, can create files Herg Linux - Software 1 09-14-2006 09:48 AM
Linux, Create Dirs=no, Create files=yes. Possible? tisource Linux - General 4 01-12-2004 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration