Created
May 11, 2021 00:49
-
-
Save kevincantu/37081a6b1c2b816ce1a5eae852e07243 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# specify the URL like usual, but point that DNS entry at a different server either by IP or by alt. domain | |
# https://daniel.haxx.se/blog/2018/04/05/curl-another-host/ | |
# | |
curl --resolve example.test:443:127.0.0.1 https://example.test/ | |
curl --connect-to example.test:443:alt.test:443 https://example.test/ | |
curl --connect-to example.test:443:alt.test:443 https://example.test/ --header "Host: alt2.test" | |
# and for TLS certificate checking: | |
openssl s_client -servername example.test -connect alt.test:443 2>/dev/null </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | openssl x509 -text -noout | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment