#!/bin/bash -f [[ "$SG_NAME" ]] || SG_NAME=2010 EXTRAS="$*" # shellcheck disable=SC2086 # deliberate word-splitting of $EXTRAS aws ec2 create-security-group --out text \ --group-name "$SG_NAME" --description "Port 2010 for Artemis" \ $EXTRAS ingress () { PROTO=$1 PORT=$2; shift 2 DESC="$*" echo "# $PROTO $PORT $DESC" # shellcheck disable=SC2086 # deliberate word-splitting of $EXTRAS aws ec2 authorize-security-group-ingress --out text \ --group-name "$SG_NAME" --ip-permissions \ "IpProtocol=$PROTO,ToPort=$PORT,IpRanges=[{Description=\"$DESC\",CidrIp=0.0.0.0/0}],FromPort=$PORT" \ $EXTRAS } ingress tcp 22 SSH for remote admin ingress tcp 80 Web remote control ingress tcp 2010 2010 for Artemis ingress tcp 10011 TeamSpeak Query # see doc/serverquery - IS THIS NEEDED? # tcp 10022 TeamSpeak SSH Query ? # tcp 10080 TeamSpeak WebQuery # see doc/webquery.md ingress tcp 30033 TeamSpeak FileManager ingress udp 9987 TeamSpeak VS1 ingress tcp 35666 Empty Epsilon ingress udp 35666 Empty Epsilon ingress udp 2010 2010 for Artemis3 Cosmos ingress udp 2023 2023 for Artemis3 Cosmos ingress udp 3100 3100 for Artemis3 Cosmos