Created
June 4, 2019 12:24
-
-
Save vdo/6b2c75a6d82fcf84f3965c8fd4f96afd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
PORT=5001 | |
PROTO=tcp | |
TRAVIS_IPS=$(curl -s https://dnsjson.com/nat.travisci.net/A.json | jq -r '.results.records|sort|join(" ")') | |
for ip in ${TRAVIS_IPS[@]}; do | |
echo "Adding... $ip" | |
ufw allow from $ip to any proto $PROTO port $PORT | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment