I am trying to configure my computer to run its own DNS server. The only thing I want to do is to forward all requests for my.example.com
to my-staging.example.com
. So, when I would use a phone, who's DNS is my computer, the requests would also be redirected.
I can't seem to figure out what exactly should the zone file contain, could anyone please help ?
I tried:
example.com. 7200 IN SOA ns1.example.com. (
2008010402
15
3600
3000000
86400 )
IN NS example.com
my.example.com. IN A 213.144.138.203
but does not seem to work.
Any help is greatly appreciated.
Thanks.
You are going to want to use a CNAME record to setup the alias. Once you have yoru basic headers and ruls in place, you'll need something like this:
(Note trailing dot is important.)
However since this dns file will be hosting the DNS for example.com, you also need a way to resolve the my-staging address. You can do this by seting a static A record or by using an alternate name if it has one.
or