This script checks the SSL installation and page title consistency across all the IP addresses resolved by a given domain. It can be used to test the configuration of CDNs (Content Delivery Networks) and load balancers.
This script uses bash
, curl
, openssl
and dig
, make sure they are installed on your system before running the script.
To use the script, follow the steps below:
- Save the script into a file named
check.sh
. - Make the script executable by running the command
chmod +x check.sh
. - Run the script with your domain as an argument:
./check.sh example.com
.
The script does the following for each IP address resolved from the given domain:
- It checks if SSL is properly installed.
- It fetches and prints the website title.
It only considers IP addresses in the resolution, CNAMEs are ignored.
The script prints an error message and exits with a non-zero status if SSL is not properly installed on an IP address, or if the titles from different IP addresses do not match.
- This script assumes that SSL is installed on port 443.
- It expects the title to be on a single line and only one title per page.
This script is released under the MIT license.