Skip to content

Commit

Permalink
improve iinstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
magnussolution committed Jun 30, 2022
1 parent 5448ddc commit 48ade80
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion script/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,21 @@ app_set=1.6" >> /etc/asterisk/asterisk.conf
echo 500000 > /proc/sys/fs/file-max
echo "fs.file-max=500000">>/etc/sysctl.conf


ulimit -c unlimited # The maximum size of core files created.
ulimit -d unlimited # The maximum size of a process's data segment.
ulimit -f unlimited # The maximum size of files created by the shell (default option)
ulimit -i unlimited # The maximum number of pending signals
ulimit -n 999999 # The maximum number of open file descriptors.
ulimit -q unlimited # The maximum POSIX message queue size
ulimit -u unlimited # The maximum number of processes available to a single user.
ulimit -v unlimited # The maximum amount of virtual memory available to the process.
ulimit -x unlimited # ???
ulimit -s 240 # The maximum stack size
ulimit -l unlimited # The maximum size that may be locked into memory.
ulimit -a # All current limits are reported.


echo '
* soft nofile 500000
* hard nofile 500000
Expand Down Expand Up @@ -863,7 +878,7 @@ iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 10000:40000 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
iptables -I INPUT -j DROP -p udp --dport 5060 -m string --string "friendly-scanner" --algo bm
Expand All @@ -881,6 +896,7 @@ if [ ${DIST} = "DEBIAN" ]; then
apt-get install -y iptables-persistent
sudo iptables-save > /etc/iptables/rules.v4
elif [ ${DIST} = "CENTOS" ]; then
iptables -A INPUT -p udp -m udp --dport 10000:50000 -j ACCEPT
service iptables save
systemctl restart iptables
fi
Expand Down

0 comments on commit 48ade80

Please sign in to comment.