You are not logged in.

#1 2015-03-03 16:30:09

Gigitsu
Member
Registered: 2013-12-06
Posts: 21

Dns server for specific domain

Is there a way to define a dns server for a specific domain?
I'm setting up a develop machine with an amp stack and i want to redirect all urls with a specific domain (i.e. project.dev) to 127.0.0.1.
I've done this on OSX with dnsmasq configured in this way:

# dnsmasq.conf

address=/.dev/127.0.0.1
listen-address=127.0.0.1
port=35353

and adding a dev file in /etc/resolver with this content

# /etc/resolver/dev

nameserver 127.0.0.1
port 35353

but this in arclinux with dhcpd doesn't work.

I've tested dnsmasq with

dig test.dev@127.0.0.1 -p 35353

and it works (the address returned is 127.0.0.1) so the problem is the resolver.

I've also tried either put into /etc/resov.conf.head this:

# /etc/resolv.conf.head

nameserver 127.0.0.1
port 35353

and configure dnsmasq with the default 53 port without luck.

This is my /etc/resolv.conf

# /etc/resolv.conf

nameserver 127.0.0.1
nameserver 192.168.0.1

Offline

#2 2015-03-03 17:01:53

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: Dns server for specific domain

Looking at `man resolv.conf`, the custom port option does not exist; can't you use the default (53) port?

Ot; the .dev-tld is owned by Google and might conflict

Last edited by Spider.007 (2015-03-03 17:02:09)

Offline

#3 2015-03-03 17:10:57

Gigitsu
Member
Registered: 2013-12-06
Posts: 21

Re: Dns server for specific domain

I've already tried to use the default port but it still doesn't work.

Yes I know that the dev domain will be used in future, it is the first thing that came to my mind and I will change it to something more personal, thank you

Offline

#4 2015-03-03 17:16:16

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: Dns server for specific domain

On linux you should simply run all dns request through one nameserver that forwards everything it doesn't understand. [Edit: You can do that with dnsmasq.] Another simple way to create a local developer zone would be to use wildcard_dns_proxy instead.

Last edited by progandy (2015-03-03 17:20:29)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#5 2015-03-03 17:23:45

Gigitsu
Member
Registered: 2013-12-06
Posts: 21

Re: Dns server for specific domain

Thank you, I will give it a try

Offline

Board footer

Powered by FluxBB