You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/terraform/shared/scripts/ip_tables.sh

14 lines
416 B

#!/usr/bin/env bash
set -e
sudo iptables -I INPUT -s 0/0 -p tcp --dport 8300 -j ACCEPT
sudo iptables -I INPUT -s 0/0 -p tcp --dport 8301 -j ACCEPT
sudo iptables -I INPUT -s 0/0 -p tcp --dport 8302 -j ACCEPT
sudo iptables -I INPUT -s 0/0 -p tcp --dport 8400 -j ACCEPT
if [ -d /etc/sysconfig ]; then
sudo iptables-save | sudo tee /etc/sysconfig/iptables
else
sudo iptables-save | sudo tee /etc/iptables.rules
fi