I have a host with a database installed on it. In order to access the database, the clients use a DNS Alias (CNAME) - AliasOne - and the database port.
DNS Aliases are managed by colleagues in another department.
I had to request a more explicit alias - AliasTwo - for the same host.
Now: I need to delete AliasOne : how can I check which Alias is used to connect on the host/to the database ?
I don't get this information in the database logs.
I tried to create an iptables rule :
iptables -A INPUT -p tcp -s AliasOne --dport 3306 -j LOG --log-prefix "AliasOne: " --log-tcp-options --log-ip-options
but it translates the alias with its hostname, thus, it will also log the connection attempts of AliasTwo.
- I didn't manage to get the answer with nslookup, dig, last. Am I using them wrong ?
Any clue anybody ? (I don't want a service interruption, so "delete and see if somebody complains" is not an option ;))