Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Bind: translate a fake domain into an external (real) ip

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
suvois
Posts: 1
Joined: 2015-05-26 12:30

Bind: translate a fake domain into an external (real) ip

#1 Post by suvois »

Hi guys,

I am playing around a little with my just installed bind server (bind9) and wondering if it maybe would also be possible to make bind resolve fake domains into an external ip pointing to (for example) Google.com. So, that if I type (for example) only the word "Google" into my webbrowser that bind (following my local zone file) wil send me directly to google.com.

I already tried something like this, but it didn't work:

Code: Select all

google.      IN      SOA     ns.google. home.(

                                                        2006081401
                                                        28800
                                                        3600
                                                        604800
                                                        38400
 )

@    IN       A      74.125.133.101

And doing "dig google" I get:

Code: Select all

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> google
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 614
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;google.			IN	A

;; AUTHORITY SECTION:
.			10687	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2015052600 1800 900 604800 86400

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue May 26 10:35:56 2015
;; MSG SIZE  rcvd: 105

User avatar
levlaz
Posts: 179
Joined: 2012-09-27 12:06
Location: San Francisco, CA

Re: Bind: translate a fake domain into an external (real) ip

#2 Post by levlaz »

If you want to do this for just your local machine or server, then you can accomplish this in /etc/hosts

Simply add the following to /etc/hosts

Code: Select all

216.58.217.142  google.com  google
Best,

Lev
Blog

Post Reply