We have a NAT'ed cpanel server and we have been find that some web plugins will look up the address for the and obtain the external address. Requests to that address will not come back to the server.
We have been manually adding entries into the /etc/hosts file to over come this issue.
Does someone have a script that will do this automatically?
As very rough pseudocode:
whmapi1 listaccounts
for each non-suspended account, get the ip address via dns.
if returned address is external server address, add the host-name alongwith internal address to /etc/hosts
Oh, there probably needs to be a remove step there also.
We have been manually adding entries into the /etc/hosts file to over come this issue.
Does someone have a script that will do this automatically?
As very rough pseudocode:
whmapi1 listaccounts
for each non-suspended account, get the ip address via dns.
if returned address is external server address, add the host-name alongwith internal address to /etc/hosts
Oh, there probably needs to be a remove step there also.