corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » A Local DNS


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author A Local DNS
ed
Member

Registered: 10th Sep 03
User status: Offline
2nd May 12 at 20:31   View User's Profile U2U Member Reply With Quote

For development I usually modify the hosts file on my computer to route domain names to my local webserver. This works fine, but for a project I'm working on now I need to be able to set wildcard subdomains. You can't use wildcards in the hosts file, so I guess I need to run a local DNS?

Anyone know where to start when doing this on OSX? I basically need to be able to route *.development.local to 127.0.0.1.
Dom
Member

Registered: 13th Sep 03
User status: Offline
2nd May 12 at 22:42   View User's Profile U2U Member Reply With Quote

BINDs available under OSX, just a case of creating local 'TLD' zones and making sure you have a forwarder (ISPs DNS) setup for all other domains.

This gives an idea of BIND config - http://www.madboa.com/geek/soho-bind/

[Edited on 02-05-2012 by Dom]
ed
Member

Registered: 10th Sep 03
User status: Offline
3rd May 12 at 09:19   View User's Profile U2U Member Reply With Quote

Thanks Dom - had it working using MacPorts and DNSMASQ but it's no good. You have to setup DNSMASQ with a LAN IP address which is no good as I work in a number of places with a number of different IP's.

I'll give BINDs a go
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
3rd May 12 at 09:24   View Garage View User's Profile U2U Member Reply With Quote

Unrelated I know but I'd cry if I lost my HOSTS file, it's stupidly long as I admin loads of domans on an off-domain laptop
noshua
Member

Registered: 19th Nov 08
User status: Offline
3rd May 12 at 09:27   View User's Profile U2U Member Reply With Quote

Pow maybe You should Dropbox it to be safe! Run a command script to copy it to Dropbox everyone you logon windows
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
3rd May 12 at 09:30   View Garage View User's Profile U2U Member Reply With Quote

I don't trust 'cloud based storage solutions'. Point taken though I should add it to my backup
John
Member

Registered: 30th Jun 03
User status: Offline
3rd May 12 at 09:44   View User's Profile U2U Member Reply With Quote

What do you need everything in HOSTS for Pow?
ed
Member

Registered: 10th Sep 03
User status: Offline
3rd May 12 at 09:59   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by pow
I don't trust 'cloud based storage solutions'. Point taken though I should add it to my backup

Backing up to Dropbox is a hell of a lot more secure than just keeping one copy on a fragile HDD!
Dom
Member

Registered: 13th Sep 03
User status: Offline
3rd May 12 at 10:08   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by ed
Thanks Dom - had it working using MacPorts and DNSMASQ but it's no good. You have to setup DNSMASQ with a LAN IP address which is no good as I work in a number of places with a number of different IP's.

I'll give BINDs a go


IIRC, in the DNSMASQ configs you should have been able to bind the listening address to the localhost something like 'listening-address=127.0.0.1'. And it's probably easier to setup than BIND, although you'd have had to setup the wildcards separately (has a weird arse way of doing it from what i can remember) to the hosts file.

Have a look - http://www.g-loaded.eu/2010/09/18/caching-nameserver-using-dnsmasq/ AND http://daniel.hahler.de/easy-dns-wildcard-setup-for-local-domains-using-dnsmasq

[Edited on 03-05-2012 by Dom]
ed
Member

Registered: 10th Sep 03
User status: Offline
3rd May 12 at 10:19   View User's Profile U2U Member Reply With Quote

I'll have another look then, I tried setting it up to 127.0.0.1 and couldn't get on the web afterwards. I'm a bit of a n00b though so I think I must have done it wrong!
Dom
Member

Registered: 13th Sep 03
User status: Offline
3rd May 12 at 11:02   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by ed
I'll have another look then, I tried setting it up to 127.0.0.1 and couldn't get on the web afterwards. I'm a bit of a n00b though so I think I must have done it wrong!


Again you'll need to add forwarders (forwards DNS requests to another DNS server if it can't find the zones/lookup locally), so have a look at the resolv.conf (or resolv.dnsmasq for DNSMASQ) file and enter your usual DNS IPs there.
First link i posted gives you a decent run-through of the setup. As said, DNSMASQ usually uses the hosts file but you'll have to follow the second link for using wildcards.
ed
Member

Registered: 10th Sep 03
User status: Offline
3rd May 12 at 11:22   View User's Profile U2U Member Reply With Quote

Brilliant - thanks

All this effort to make a nice node.js environment. Node.js is fantastic though!
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
3rd May 12 at 11:43   View Garage View User's Profile U2U Member Reply With Quote

quote:
Originally posted by John
What do you need everything in HOSTS for Pow?


Mainly for Hyper-V snap in but other little bits and bobs too. I manage about 7 Hyper-V servers using my off domain laptop and HVRemote
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
3rd May 12 at 11:43   View Garage View User's Profile U2U Member Reply With Quote

quote:
Originally posted by ed
quote:
Originally posted by pow
I don't trust 'cloud based storage solutions'. Point taken though I should add it to my backup

Backing up to Dropbox is a hell of a lot more secure than just keeping one copy on a fragile HDD!


I just don't like the idea of someone else having my data!
Dom
Member

Registered: 13th Sep 03
User status: Offline
3rd May 12 at 11:56   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by pow
quote:
Originally posted by ed
quote:
Originally posted by pow
I don't trust 'cloud based storage solutions'. Point taken though I should add it to my backup

Backing up to Dropbox is a hell of a lot more secure than just keeping one copy on a fragile HDD!


I just don't like the idea of someone else having my data!


Encrypt it? Or use a proper 'cloud' based backup provider, like Backblaze, which does it before it hits their servers (only you have access).
ed
Member

Registered: 10th Sep 03
User status: Offline
3rd May 12 at 12:12   View User's Profile U2U Member Reply With Quote

I can recommend Backblaze - just sits there in the background looking after your entire HDD without any fuss
John
Member

Registered: 30th Jun 03
User status: Offline
3rd May 12 at 12:15   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by pow
quote:
Originally posted by John
What do you need everything in HOSTS for Pow?


Mainly for Hyper-V snap in but other little bits and bobs too. I manage about 7 Hyper-V servers using my off domain laptop and HVRemote


Was just wondering because I manage loads of networks have never needed it, don't use Hyper-V though.
pow
Premium Member

Avatar

Registered: 11th Sep 06
Location: Hazlemere, Buckinghamshire
User status: Offline
3rd May 12 at 12:35   View Garage View User's Profile U2U Member Reply With Quote

It's mainly Hyper-V but Sophos Administration is another thing that requires it...
John
Member

Registered: 30th Jun 03
User status: Offline
3rd May 12 at 12:45   View User's Profile U2U Member Reply With Quote

Fair do's, I really should get a look at Hyper-V anyway.

Handy having a server running, can just use that for DNS if need be. (I know a server is not a requirement for DNS).

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
broadband Adam-D Geek Day 17 1483
7th Jan 04 at 15:50
by drunkenfool
 
ahh....broadband! Cosmo Geek Day 11 800
27th Oct 05 at 11:01
by Cosmo
 
Internet connections jmucorsasport Geek Day 8 789
17th Feb 08 at 18:00
by MikeD
 
SBS 2003 DNS problems! pow Geek Day 6 738
6th Feb 09 at 13:52
by pow
 
Apache & DNS xa0s Geek Day 4 571
24th Aug 09 at 12:26
by ENB
 

Corsa Sport » Message Board » Off Day » Geek Day » A Local DNS 28 database queries in 0.0148070 seconds