DNS migration to Route53 - amazon-ec2

I have transferred domain name from https://www.onlydomains.com/ to aws Route53. Using name-server,it works most of the time, but sometime it will not be available for some time max 5 min.
I have tried using alias, it works for other domain which I have added alias to check it.

Probably your domain zone still in transfer, you could either use tools like drill/dig:
$ dig your-domain.tld ns
This will show the existing nameservers, but the same tool can be used for checking A records, example:
$ dig your-domain.tld +trace
The +trace option makes iterative queries to resolve the name being looked up. it helps to see what servers still using your old DNS provider.
Also, could be an issue with your own DNS, to check for example using google DNS servers you could use something like:
$ dig #8.8.8.8 your-domain.tld
Also, give a try to https://intodns.com/ to check more details

Related

Get DNS infos for local machine interfaces

I need the DNS suffix of all my local interfaces on my PC.
Is there way how I can achieve this via Go?
Best case would be for any OS
Necessary: working on Windows
I have tried net.Inferfaces() and all the net commands but I haven't found anything regarding the DNS server.
EDIT
I have found the solution for the Windows-specific version but it would be interesting if there is anything that works for Linux and macOS too.
I don't think there is a solution that work for any OS. In Linux the DNS suffix is not interface specific but system wide, it is configured in /etc/resolv.conf. Here is an excerpt from the man page:
search Search list for host-name lookup.
By default, the search list contains one entry, the local domain name. It is determined from the local hostname returned by gethostname(2); the local domain name is taken to be everything after the first '.'. Finally, if the hostname does not contain a '.', the root domain is assumed as the
local domain name.
This may be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names. Resolver queries having fewer than ndots dots (default is 1) in them will be attempted using each component of the search path in turn until a match is found.
For environments with multiple subdomains please read options ndots:n below to avoid man-in-the-middle attacks and unnecessary traffic for the root-dns-servers. Note that this process may be slow and will generate a lot of network traffic if the servers for the listed domains are not local, and
that queries will time out if no server is available for one of the domains.
If there are multiple search directives, only the search list from the last instance is used.
The net package standard library parses this file to get the DNS config, so the DNS resolver should behave as expected, however, the parsing functionality is not exposed.
The libnetwork.GetSearchDomains func in the libnetwork library should be able to help you out. If there are no search entries in /etc/resolv.conf, you should use the hostname, which can be gotten with the os.Hostname func.
I believe this also works for FreeBSD and Mac OS since they are both "UNIX like". But I am not 100% sure.

OKD openshift-ansible: Updating 'openshift_master_cluster_public_hostname' and certificate

I have Openshift deployed and working fine, but now am putting a DNS record and a valid certificate in front of it. I haven't had any luck and haven't found any documentation on doing this.
My strategy just to update the hostname was to sed the existing public hostname with the new one in all files in the master/node configurations, but that didn't seem to work.
Is there a specific playbook/inventory fields I need to use/update in order to update this easily from the Ansible master?
UPDATE: I ran the 'openshift-master/redeploy-certificates.yaml' after I updated the inventory file with the following:
openshift_master_overwrite_named_certificates=true
openshift_master_cluster_public_hostname=new-public-hostname.com
Afterwards I checked the certs on the master node and they seemed to have added a new SAN to the master.server.crt and etcd.server.crt. However, when I go to the new hostname, it still redirects me to the old hostname. Is there another playbook I'm missing to update that in the system?
The redirection might be caused by the web console service that probably is not configured and uses the old masterURL.
Check this previous thread https://stackoverflow.com/a/54399071/2802150 as it addresses the same problem.

Hosts File for Greenplum Installation

I am setting up greenplum 3 node cluster for POC while checking installation steps I found that hostfile_exkeys file have to be in master node.
Can anyone tell me where I should create this file location, node etc?
And most important what to put in this?
You create hostfile_exkeys on the Master. It isn't needed on the other hosts. You can put it in /home/gpadmin or anywhere that is convenient for you.
You put the three hostnames for your POC in this file. Example:
mdw
sdw1
sdw2
This is documented pretty well here: https://gpdb.docs.pivotal.io/5120/install_guide/prep_os_install_gpdb.html
You can also run a POC in the cloud. Greenplum is available in AWS, Azure, and GCP. It does all of the configuration for you. You can even use the BYOL product listings for 90 days for free to evaluate the product or you can use the Hourly billed products to get support while you evaluate the product.
There are examples in the utililty reference for gpssh-exkeys documentation but, in general, you should put in all the hostnames in your cluster. If there a multiple network-interfaces, those can go in instead.
I generally put this file either in /home/gpadmin or /home/gpadmin/gpconfigs (good place to keep all files for initial setup and initialization).
Your file will look something like (one name per line):
mdw
sdw1
sdw2
If there are 2 network interfaces, it might look something like:
mdw
mdw-1
mdw-2
sdw1
sdw1-1
sdw1-2
sdw2
sdw2-1
sdw2-2
Your /etc/hosts file (on all server) should include the IP addresses for all the interfaces and their names, so this file should match those names listed in /etc/hosts.
This is primarily to allow the master to exchange ssh keys with all hosts so it is always password-less login to the hosts. After you have this file set up, you will run (example):
gpssh-exkeys -f /home/gpadmin/gpconfigs/yourhostfilename
I hope this helps.

How to get list of DNS servers for system resolver

In Ruby I can get the list of DNS servers like this:
require 'resolv'
Resolv::DNS::Config.default_config_hash[:nameserver]
How to do the same in Go?
The Resolver type in the net package lets you resolve DNS names but it doesn't seem to export the DNS servers it uses.
Ruby parses /etc/resolv.conf so I guess you'll have to do that yourself or see if you can find a package that does it for you.
Update: I made a small library to do sort of the same as Ruby's DNS class. Hope it helps.

How to query TXT and SRV records from Windows?

I am attempting to query a set of SRV records using the naked host name (e.g. _service._proto) however this fails unless I also include the domain name. This is strange because other tools such as nslookup work fine and also using the same API call to query A records works fine with naked host names.
dsRet = DnsQuery("_service._udp",DNS_TYPE_SRV,DNS_QUERY_STANDARD,NULL,&pQueryResultsSet,NULL);//==DNS_ERROR_RCODE_NAME_ERROR
dsRet = DnsQuery("_service._udp",DNS_TYPE_TEXT,DNS_QUERY_STANDARD,NULL,&pQueryResultsSet,NULL);//==DNS_ERROR_RCODE_NAME_ERROR
dsRet = DnsQuery("_service._udp.example.com",DNS_TYPE_SRV,DNS_QUERY_STANDARD,NULL,&pQueryResultsSet,NULL);//==ERROR_SUCCESS
dsRet = DnsQuery("_service._udp.example.com",DNS_TYPE_TEXT,DNS_QUERY_STANDARD,NULL,&pQueryResultsSet,NULL);//==ERROR_SUCCESS
dsRet = DnsQuery("collector",DNS_TYPE_A,DNS_QUERY_STANDARD,NULL,&pQueryResultsSet,NULL); //==ERROR_SUCCESS
I can of course query the system to get the primary domain name and maybe even all of the configured search domains but I'm pretty sure I shouldn't have to do that. I can find very little reference to the Windows DNS APIs out there so I'm wondering if there is a better way to query TXT and SRV records. Does anyone have any experience with this under Windows?
Thanks for any suggestions,
Robert
The reason that it works under nslookup is that windows is performing all the searches using the domain suffixes that it is configured with. To see this in action start up nslookup and then issue the "set debug" command. Now perform your search and you will see the requests and responses send and received by your machine. There will be an unanaswered one for the "naked host name" before one of the configured domain suffixes is appended and matched.
Hope that this helps.
Jonathan
Here is a free DNS client library that you can use to query the DNS for different types of query: http://www.simpledns.com/dns-client-lib.aspx also http://arsofttoolsnet.codeplex.com

Resources