Skip to content

Instantly share code, notes, and snippets.

@inotnako
Created October 4, 2023 12:56
Show Gist options
  • Save inotnako/78a7a7bffbedf8e47f5fe16cec5d3876 to your computer and use it in GitHub Desktop.
Save inotnako/78a7a7bffbedf8e47f5fe16cec5d3876 to your computer and use it in GitHub Desktop.
check_fcm_ports.sh
#!/bin/bash
echo "Check port range 5228-5230..."
echo ""
for host5 in mtalk.google.com mtalk4.google.com mtalk-staging.google.com mtalk-dev.google.com alt1-mtalk.google.com alt2-mtalk.google.com alt3-mtalk.google.com alt4-mtalk.google.com alt5-mtalk.google.com alt6-mtalk.google.com alt7-mtalk.google.com alt8-mtalk.google.com fcm-xmpp.googleapis.com gcm-xmpp.googleapis.com
do
nc -w 2 -G 2 -v -z $host5 5228-5230
done
echo "Check port range 443..."
echo ""
for host4 in mtalk.google.com mtalk4.google.com mtalk-staging.google.com mtalk-dev.google.com alt1-mtalk.google.com alt2-mtalk.google.com alt3-mtalk.google.com alt4-mtalk.google.com alt5-mtalk.google.com alt6-mtalk.google.com alt7-mtalk.google.com alt8-mtalk.google.com android.apis.google.com device-provisioning.googleapis.com firebaseinstallations.googleapis.com android.clients.google.com fcm.googleapis.com fcm-xmpp.googleapis.com firebaseinstallations.googleapis.com gcm-http.googleapis.com gcm-xmpp.googleapis.com android.googleapis.com
do
nc -w 2 -G 2 -v -z $host4 443
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment