Skip to content

Commit

Permalink
Update rpinstall.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
CUGCR committed Nov 29, 2017
1 parent fc0dc9c commit b10430e
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions rpinstall.sh
Expand Up @@ -56,35 +56,7 @@ sudo service ssh restart


#setup firewall
#First delete all existing rules
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT



#Set the INPUT policy to DROP All:
sudo iptables -P INPUT DROP

# Allow packets from connections related to established ones, packets
# from established ones, and packets from localhost:
sudo iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A INPUT -i lo -j ACCEPT

# Allow new connections to TCP ports:
sudo iptables -A INPUT -p TCP -m multiport --dports 2202,23,22,25,8080,80,443,5060,5061,1900,69,139,445 \
-m state --state NEW -j ACCEPT

# Allow new connections to TCP ports:
sudo iptables -A INPUT -p UDP -m multiport --dports 22,1434,443,5060,5061,1900,69,139,44 \
-m state --state NEW -j ACCEPT

sudo iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
sudo iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT

#Save rules and make them persistant
sudo netfilter-persistent save

sudo $SCRIPTSDIR/firewall.sh

#update crontab
#write out current crontab
Expand Down

0 comments on commit b10430e

Please sign in to comment.