- Setup DNS servers on all 3 servers at home, each primary masters, since they won't change, its okay to just copy them all and make them independent and not make them secondary DNS servers.
- Setup AWS DNS server for local domain.
- apt-get install bind9
- Setup resolv.conf : Not sure which did, but restarting the server made resolv.conf right.
- Added "nameserver 127.0.0.1" to the file /etc/resolvconf/resolv.conf.d/head.
- /etc/resolvconf/resolv.conf.d/head:search mylocaldomain us-east-2.compute.internal
- /etc/resolvconf/resolv.conf.d/base:search mylocaldomain us-east-2.compute.internal
- Added the forwarder to the amazon DNS.
- To the file /etc/bind/named.conf.options
- forwarders { 172.32.0.2; };
- Add add this but you should add more restrictions. Since l let AWS restrict by network put this in. Otherwise, none of your servers will be able to query it.
- allow-query { any; };
- Follow the steps in the previous doc from "Now setup the DNS for your own network."
- Being an idiot, I didn't figure out the command to restart the netowork, so just reboot it.
- Get the ip addresses from the EC2 console, or the scripts.
- Finally, to let the other servers use your DNS server:
- Open up the DNS port only to those servers you trust.
- Add your DNS server /etc/resolvconf/resolv.conf.d/head on those servers.
- TODO --- this needs to be done, last step.
- At home, each is a master. DONE
- AWS
echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d/head
echo "search mylocaldomain us-west-2.compute.internal" >> /etc/resolvconf/resolv.conf.d/head
echo "search mylocaldomain us-west-2.compute.internal" >> /etc/resolvconf/resolv.conf.d/base
reboot # I must find a better way.
After reboot, test DNS entries.
DONE at home and work.
I will need to maintain this, but I am going to leave it out of SALT. Now to SALT, then voltdb, vertica, DAD.
I will need to maintain this, but I am going to leave it out of SALT. Now to SALT, then voltdb, vertica, DAD.
No comments:
Post a Comment