Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
BIND named wildcard to different domain.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Sun Aug 31, 2014 4:11 am    Post subject: BIND named wildcard to different domain. Reply with quote

I wonder if anyone has done this with their BIND.

My *#()@&!#ing router/DSL modem's dnsmasq server decides to give out a domain name of .Home and a search path of .Home. I couldn't seem to find a way to rebuild the firmware such that it can be configured to my personal non-public DNS domain so it could use my caching DNS server.

The main reason that I want to use my own caching DNS server? The hardcoded servers on my DSL modem do wildcards to the ISP's search engine... GRR. So when I try to access a nonexistent host, it connects to my ISP's catch all... GRRR!!!

I figured out a way to get it to dole out my private DNS server, but the domains don't match (it insists on using .Home).

My hack was to make my private DNS server respond to .Home and cname them to my private local domain... I thought about manually adding entries in, but is it possible to get bind to map:

$ORIGIN Home.
*. CNAME $1.privatedomain.

so that foo.Home will return CNAME to foo.privatedomain. I also have privatedomain on the same bind server...

Is this possible via a regular file? Or will I have to hack bind to do this?

Oh and yes, supposedly this is somewhat of a GPL violation. I should have the right to update my busybox on this router...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
fernan82
n00b
n00b


Joined: 24 Jul 2014
Posts: 70

PostPosted: Sun Aug 31, 2014 7:42 pm    Post subject: Reply with quote

There should be an option on your router to set it. Usually Host Name or something like that on your WAN setup. If you leave it blank and it defaults to .Home then setting to a dot should fix it.

I had a similar problem: my isp doles out their own domain so they can send send you to their own page when you lookup a bad domain. If I leave the option blank the router passes it along to all stations and that breaks wins resolution since I had nsswitch set to check DNS first which would never fail with that domain so all my smb hosts where resolving to my ISP address. Setting that field to a dot fixed it for me.
Back to top
View user's profile Send private message
fernan82
n00b
n00b


Joined: 24 Jul 2014
Posts: 70

PostPosted: Sun Aug 31, 2014 7:45 pm    Post subject: Reply with quote

Also a simpler solution for you may be to just use Google's public DNS servers:

8.8.8.8
4.4.4.4

You will still have to get rid of the .Home domain suffux but you won't need to run your own DNS server just for that.

<edit>
Most likely .Home is your ISP's domain so once you get rid of it you will be able to use use your ISP's DNS without it resolving invalid names to their own address. If your router doesn't have this option (it should) you can always use a static IP without using the router's DHCP server.

I use google's DNS because my ISP fails to resolve some domains correctly sometimes. Specifically it resolves gentoo.org domains wrong quite often.

As an added bonus, some paid WiFi hotspots simply use DNS redirection to take you to their pay/login page so by using Google's public DNS you get them free ;)

</edit>
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Mon Sep 01, 2014 3:09 am    Post subject: Reply with quote

(A) There is not an option at all on the crappy firmware that came with the modem/router.

(B) I want my home machines to be resolved by name, not just external machines.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
fernan82
n00b
n00b


Joined: 24 Jul 2014
Posts: 70

PostPosted: Tue Sep 02, 2014 12:28 am    Post subject: Reply with quote

I haven't seen one that doesn't have it (it's required by some ISPs) but since yours is a modem/router combo it may be different. If you must use DHCP then the easiest way to go is probably to run your own DHCP server and switch off the one on the router. Otherwise I think do have to hack bind for what you want. I'm not familiar with bind but it's not a standard dns feature.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Tue Sep 02, 2014 1:07 am    Post subject: Reply with quote

That's what I feared, didn't think multiple to multiple mapping was a standard feature of BIND. I want to try to use the modem/router combo to try to keep as much as possible running on the device in case my DNS server goes down (and likely the DHCP server would be running on this machine and it would also go down) - then in this case I'd rather it failover to using the ISP DNS server solely. Currently I have it set (luckily) to dole out my local DNS server first, then as a secondary use the ISP DNS server.

The annoying router/modem combo is an Actiontec Q1000, Qwest branded (Centurylink).

I guess I should script the conversion of all local A records to a CNAME record, perhaps hook it into the startup script. Not pleasant but it's the best that I can do until I can figure out how to unpack, edit, and repack the firmware to flash on the router/modem ...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
fernan82
n00b
n00b


Joined: 24 Jul 2014
Posts: 70

PostPosted: Sun Sep 07, 2014 12:29 am    Post subject: Reply with quote

Is this what your router's utility looks like? http://internethelp.centurylink.com/internethelp/modem-q1000-setup-quick.html

Out of curiosity, what happens if you choose "Other ISP"? does it show any extra fields?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Sun Sep 07, 2014 1:21 am    Post subject: Reply with quote

Yes that's my modem.
No I cannot select another ISP, because I don't subscribe to another ISP and thus will never authenticate pppoe. No fields show up anyway, I suspect I have to add @xyz.abc for the other ISPs.

The problem to work around is purely in the limited firmware of the modem.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum