Setting local DNS server? Ubuntu 12.04


Recommended Posts

Hii guys...

I need to create a local DNS server in my office.

Here is the scenario:

- There is a development and staging website that is hosted on a remote server.

- We need to add the host file entries in everyone's system who needs to access that site.

What we need to accomplish is

- Skip to edit the host file entries on every system and instead just use the DNS server IP that will resolve the website that has a public IP and can be accessed only from our office

.

- Should I configure caching only DNS server OR primary and slave DNS server?

I tried configuring primary DNS server but unable to setup proper zone files. The name server is not registered anywhere. I am using dnsindia as the nameserver.

Can someone help me configuring the SOA


dnsindia.com. IN SOA dnsindia.com. root.dnsindia.com. (
[/CODE]

Can we use any name above or is there any process / restrictions?

when I use dig, the answer section returns NONE.

Even if I create a forward zone file with one of the system in my local network, the host name is not resolved.

Can someone help me with the walk through / guide that will help me configure the DNS server with bind?

So if i am reading this right you have some server you need to access, so this server is not available via the public dns? There is no name I could resolve on the internet that would point to this IP of the server.

So your creating entries in your host file to access this server?

What is this entry?

So your clients that your putting the host entry in use what for dns now? Are you going to point them at this new BIND server you want to bring up, so that you can resolve say google.com and neowin.net?

Where did this ddnsindia.com come from?? You do understand that domain is already registered on the internet and currently points here for the owning nameservers

Nameservers

NS1.DOMAINRECOVER.COM

NS2.DOMAINRECOVER.COM

Now can not see who its registered to because its whois info is listing DomainProtect, do you own this domain?

Be more than happy to walk you through how to setup bind, but not really clear on what your wanting to do.. So here is an example, lets say your server IP address you create host entries for is 192.168.1.100, and you call it www.myserver.tld

so you have a host entry like this

192.168.1.100 www.myserver.tld

Is myserver this dnsindia domain? Or something else. Lets say you point to googledns now or your isp for dns currently. Just because you bring up a BIND that is setup to own the myserver.tld zone. Your clients are not going to ask him for dns -- they are going to ask googledns or your isp, etc.

So you need to point all your computers to your bind box, then you need to setup bind resolve the zone you want myserver.tld - and also forward other queries to googledns or your isp, etc.

So No if you want to resolve www.myserver.tld it can not be a caching only server, it would have to have authoritative zones, one being the myserver.tld zone - and then either query root servers for internet domains, or forward to some other dns so you can resolve say www.neowin.net, etc.

There is nothing that wrong with that SOA statement from how you presented it - your saying the SOA for dnsindia.com is a record called root.dnsindia.com -- but that is not really true.

The current SOA for that domain is

;; QUESTION SECTION:

;dnsindia.com. IN SOA

;; ANSWER SECTION:

dnsindia.com. 86400 IN SOA ns1.domainrecover.com. dnsmaster.domainrecover.com. 2011111400 28800 7200 604800 86400

So do you own that dnsindia.com domain or not - you shouldn't just grab some random name that you don't own and try and use it. If you want to use FQDN on your local network, then use domains that are not publicly feasible, ie make up the TLD, use .lan or .local, etc. For example you could use dnsindia.lan as you domain.

  • Like 2

So if i am reading this right you have some server you need to access, so this server is not available via the public dns? There is no name I could resolve on the internet that would point to this IP of the server.

So your creating entries in your host file to access this server?

What is this entry?

So your clients that your putting the host entry in use what for dns now? Are you going to point them at this new BIND server you want to bring up, so that you can resolve say google.com and neowin.net?

Where did this ddnsindia.com come from?? You do understand that domain is already registered on the internet and currently points here for the owning nameservers

Nameservers

NS1.DOMAINRECOVER.COM

NS2.DOMAINRECOVER.COM

Now can not see who its registered to because its whois info is listing DomainProtect, do you own this domain?

Be more than happy to walk you through how to setup bind, but not really clear on what your wanting to do.. So here is an example, lets say your server IP address you create host entries for is 192.168.1.100, and you call it www.myserver.tld

so you have a host entry like this

192.168.1.100 www.myserver.tld

Is myserver this dnsindia domain? Or something else. Lets say you point to googledns now or your isp for dns currently. Just because you bring up a BIND that is setup to own the myserver.tld zone. Your clients are not going to ask him for dns -- they are going to ask googledns or your isp, etc.

So you need to point all your computers to your bind box, then you need to setup bind resolve the zone you want myserver.tld - and also forward other queries to googledns or your isp, etc.

So No if you want to resolve www.myserver.tld it can not be a caching only server, it would have to have authoritative zones, one being the myserver.tld zone - and then either query root servers for internet domains, or forward to some other dns so you can resolve say www.neowin.net, etc.

There is nothing that wrong with that SOA statement from how you presented it - your saying the SOA for dnsindia.com is a record called root.dnsindia.com -- but that is not really true.

The current SOA for that domain is

;; QUESTION SECTION:

;dnsindia.com. IN SOA

;; ANSWER SECTION:

dnsindia.com. 86400 IN SOA ns1.domainrecover.com. dnsmaster.domainrecover.com. 2011111400 28800 7200 604800 86400

So do you own that dnsindia.com domain or not - you shouldn't just grab some random name that you don't own and try and use it. If you want to use FQDN on your local network, then use domains that are not publicly feasible, ie make up the TLD, use .lan or .local, etc. For example you could use dnsindia.lan as you domain.

I am very much grateful for your answers.... Thanks !!.

Entries in the host files:


66.xx.xx.84 www.myserver.tld
[/CODE]

So now, I changed the name from dnsindia.com to dnsindia.inc

I was able to setup zone file for my internal network. i.e I am able to dig / ping the internal hostnames just fine.(local IPs)

There is a website at remote location that has public IP (66.xx.xx.84)

Now when I point www.myserver.tld to public IP in zone file, it does not gets resolved.

Zone file entries as :

[CODE]
...
...
@ IN NS ns1.myserver.tld
www.myserver.tld IN A 66.xx.xx.84

[/CODE]

Do we need to include views for accessing Public IPs through local DNS?

The zone file looks fine for myserver.tld. checkzone command indicates the zone file as OK.

Please shed some light here sir

If you zone is myserver.tld

then your A record for www.myserver.tld would just be

www IN A 66.xx.xx.84

Your record is for

www.myserver.tld.myserver.tld

Why would you need to hide dnsindia.inc ?? with myserver.tld

Is that the zone your using? If you not using public domains, then there is no reason use made up stuff as examples or hide stuff.

Here are details for both the zone files::


root@dnsindia:/etc/bind# cat dnsindia.inc.db
; BIND db file for dnsindia.inc
$TTL 86400
@ IN SOA ns1.dnsindia.inc. admin.dnsindia.inc. (
2013030301 ; serial number YYMMDDNN
28800 ; Refresh
7200 ; Retry
864000 ; Expire
86400 ; Min TTL
)
NS ns1.dnsindia.inc.
MX 10 mail.dnsindia.inc.

$ORIGIN dnsindia.inc.
@ IN NS ns1.dnsindia.inc.
mail IN A 192.168.1.103
ns1 IN A 192.168.1.103
rahul IN A 192.168.1.111
[/CODE]

[CODE]
root@dnsindia:/etc/bind# cat db.mvelopes-dev.com
; Start of Authority (SOA) record
;TTL needs to be specified here too
$TTL 86400
mvelopes-dev.com. IN SOA dns.mvelopes-dev.com. root.mvelopes-dev.com. (
2013030301 ; serial # (date format)
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400) ; TTL (1 day)
; Mail Exchange (MX) records.
NS ns1.in2m.com.
; Address (A) records. (real-names of machines)
dns.mvelopes-dev.com. IN A 127.0.0.1
mvelopes-dev.com. IN A 66.xx.xx.84
www IN CNAME mvelopes-dev.com.
my IN CNAME mvelopes-dev.com.

apps.mvelopes-dev.com. IN A 66.xx.xx.85

[/CODE]

And what is not working?

you can't point to 127.0.0.1 - that is loopback, anyone that looks that is up is going to just point to themselves.

What are you trying to do with that NS record to ns1.in2m.com. whois domain is owned by.

Domain servers in listed order:

NS3.SINGLEEDGE.COM 63.171.8.252

NS4.SINGLEEDGE.COM 63.171.8.253

And what is not working?

you can't point to 127.0.0.1 - that is loopback, anyone that looks that is up is going to just point to themselves.

What are you trying to do with that NS record to ns1.in2m.com. whois domain is owned by.

Domain servers in listed order:

NS3.SINGLEEDGE.COM 63.171.8.252

NS4.SINGLEEDGE.COM 63.171.8.253

Thanks !! I got this working and was able to access the remote sites using my DNS server. There were some issues with the zone files which I checked with checkzone command. Zone files seems to be OK now.

in2m.com is a domain owned by our company. But can I exclude it? I don't want to use anything that is public. Everything should be private only for our company users.

I used dns.mvelopes-dev.com as loop back because any requests made to dns.mvelopes should be resolved by DNS server itself because that domain does not exists. (correct if I am wrong)

At last any suggestions or guide that you would prefer for the zone files OR DNS configuration that can enhance the performance of my DNS server.

Thanks in advance..

"I used dns.mvelopes-dev.com as loop back because any requests made to dns.mvelopes should be resolved by DNS server itself because that domain does not exists. (correct if I am wrong)"

You would point that to the IP of the dns server resolving it then, not loopback - if a client got told that the NS for mvelopes-dev.com was dns.mvelopes-dev.com and its ip address was 127.0.0.1 the client would query its OWN loopback, which would fail.

There is really no reason to include in2m.com, unless you want to have a zone for it on your own servers. Those domain servers are public already.

As to guides - none I would suggest, what I would suggest if your interested in BIND is http://shop.oreilly.com/product/9780596100575.do

Great book on BIND and dns in general.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I bought this game. Played it for an hour, and then got a refund from Steam. Not a fun game at all.
    • Nothing Ear buds with active noise cancellation are at their lowest price ever with 51% off by Fiza Ali Amazon is currently offering the Nothing Ear wireless earbuds at their lowest price ever with 51% off limited prime deal. The earbuds feature an 11mm dynamic drivers with a ceramic diaphragm, and support high-resolution audio codecs including AAC, SBC, LDAC, and LHDC 5.0. They support active noise cancellation of up to 45dB across a frequency range of up to 5000Hz, and include a smart ANC algorithm, adaptive noise cancellation, and a transparency mode that allows surrounding sounds to be heard when needed. Connectivity is provided via Bluetooth 5.3, with support for multiple profiles including HFP, A2DP, AVRCP, and others. The earbuds also support dual connection, allowing them to be paired with two devices at the same time. Additional features include IP54 water and dust resistance for the earbuds and IP55 for the charging case, in-ear detection, pinch controls, low-latency mode, Google Fast Pair, Microsoft Swift Pair, and a three-microphone system per earbud for clearer voice calls. The Nothing X app, available on Android and iOS, provides access to custom EQ settings, bass enhancement, personal sound profiles, ear tip fit testing, firmware updates, customisable controls, dual-device management, and a find-my-earbuds feature. In terms of battery performance, each earbud has a 46mAh battery and the charging case has a 500mAh capacity. With active noise cancellation (ANC) turned off, the earbuds should offer up to 8.5 hours of playback on a single charge and up to 40.5 hours in total with the charging case. With ANC enabled, playback should last up to 5.2 hours on the earbuds and up to 24 hours with the case. For calls, talk time should reach up to 5 hours on the earbuds and 23 hours with the case when ANC is off, while ANC on should provide up to 4 hours on the earbuds and 18 hours with the case. Finally, fast charging should deliver up to 10 hours of playback from 10 minutes of charging when ANC is disabled. Nothing Ear Wireless Earbuds Bluetooth: $73.15 (Amazon US) - 51% off Good to know This Amazon deal is U.S. specific, and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
    • Microsoft officially launched its Copilot Cowork enterprise AI agent on June 16, 2026, switching to usage-based pricing on the same day it disclosed it is considering a Microsoft-hosted version of China's DeepSeek V4 as a lower-cost engine for the platform — a pairing that puts the company on a collision course with both its enterprise customers' security teams and a White House that has spent months trying to wall off Chinese AI from American infrastructure.................... https://www.techtimes.com/articles/318647/20260618/microsoft-eyes-deepseek-v4-copilot-cowork-what-azure-hosting-cannot-fix.htm  
    • Forza Horizon 6 gets another hotfix for one of the game's online modes by Taras Buria Recently, Forza Horizon 6 players discovered an interesting glitch that allowed farming a crazy amount of in-game credits in a few minutes. Playground Games quickly pulled the plug on the exploit by disabling one of the game's online modes, and today, the studio is rolling out another hotfix. In my review, I complained about the game still showering gamers with cars, credits, and wheelspins. As such, earning money in Forza Horizon 6 is not a particularly difficult task. You simply have to play the game, crazy, I know. However, people still found an easier path to becoming a billionaire in Forza Horizon 6. All you had to do was purchase the Hummer EV, install a specific tune, shift in reverse while going at about 15 MPH, hit a wall, and get launched into the stratosphere at the speed of light. While mid-air, launch Eliminator and quickly get eliminated. Boom, the game just awarded you with a few million in-game credits. Initially, Playground Games disabled Eliminator to prevent people from farming credits. Now, following the release of the first balancing update, developers are rolling out a new update that re-enables Eliminator and gives users a free McLaren Sabre as a gesture of goodwill. Here is the changelog: One critical issue remains unpatched, though. There are quite a few reports of the game wiping gamers' saves, and developers are still looking into that. To avoid potential data loss, Playground Games recommends taking one of the steps outlined in a previously published support article.
  • Recent Achievements

    • First Post
      AndreaB earned a badge
      First Post
    • Week One Done
      Huge Trailer earned a badge
      Week One Done
    • Week One Done
      Classifyskilleducation earned a badge
      Week One Done
    • One Month Later
      eurospharma62 earned a badge
      One Month Later
    • Week One Done
      With What earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      592
    2. 2
      +Edouard
      171
    3. 3
      PsYcHoKiLLa
      76
    4. 4
      Michael Scrip
      68
    5. 5
      neufuse
      64
  • Tell a friend

    Love Neowin? Tell a friend!