Skip to content

Commit c033bc6

Browse files
author
magnussolution
committed
uppdat iptable on install files
1 parent 74585cb commit c033bc6

5 files changed

Lines changed: 25 additions & 22 deletions

File tree

build/MagnusBilling-current.tar.gz

921 Bytes
Binary file not shown.

classic/src/view/did/Controller.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ Ext.define('MBilling.view.did.Controller', {
6363
form.findField('noworkaudio').setVisible(false);
6464
form.findField('cbr_total_try').setVisible(false);
6565
form.findField('cbr_time_try').setVisible(false);
66-
me.lookupReference('billingTab').show();
67-
me.lookupReference('generalTab').show();
6866
me.callParent(arguments);
6967
},
7068
onEdit: function() {

protected/commands/update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ chmod -R 700 /var/www/html/mbilling/assets
6262
chmod -R 700 /var/www/html/mbilling/resources/sounds
6363
chmod -R 700 /var/www/html/mbilling/resources/images
6464
chmod +x /var/www/html/mbilling/resources/asterisk/mbilling.php
65-
chmod -R 100 /var/www/html/mbilling/resources/asterisk/
65+
chmod -R 555 /var/www/html/mbilling/resources/asterisk/
6666

6767

6868
if [[ -e /var/www/html/mbilling/resources/images/lock-screen-background.jpg ]]; then

script/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,8 @@ iptables -A INPUT -j DROP -p udp --dport 5060 -m string --string "VaxSIPUserAgen
878878
if [ ${DIST} = "DEBIAN" ]; then
879879
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections
880880
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections
881-
apt-get install -y --force-yes iptables-persistent
881+
apt-get install -y iptables-persistent
882+
sudo iptables-save > /etc/iptables/rules.v4
882883
elif [ ${DIST} = "CENTOS" ]; then
883884
service iptables save
884885
systemctl restart iptables

script/installOpenSips-3.1.sh

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -235,25 +235,29 @@ echo
235235
echo "Installing Fail2ban & Iptables"
236236
echo
237237

238-
apt install firewalld -y
239-
systemctl start firewalld
240-
systemctl enable firewalld
241-
242-
firewall-cmd --zone=public --add-port=22/tcp --permanent
243-
firewall-cmd --zone=public --add-port=80/tcp --permanent
244-
firewall-cmd --zone=public --add-port=19639/tcp --permanent
245-
firewall-cmd --zone=public --add-rich-rule="
246-
rule family=\"ipv4\"
247-
source address=\"$ipMbilling/32\"
248-
port protocol=\"tcp\" port=\"3306\" accept" --permanent
249-
firewall-cmd --zone=public --add-port=5060/udp --permanent
250-
firewall-cmd --zone=public --add-port=35000-65535/udp --permanent
251-
252-
253-
firewall-cmd --reload
254-
firewall-cmd --zone=public --list-all
255-
256238

239+
iptables -F
240+
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
241+
iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT
242+
iptables -A INPUT -i lo -j ACCEPT
243+
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
244+
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
245+
iptables -P INPUT DROP
246+
iptables -P FORWARD DROP
247+
iptables -P OUTPUT ACCEPT
248+
iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
249+
iptables -A INPUT -p udp -m udp --dport 10000:40000 -j ACCEPT
250+
iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
251+
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
252+
iptables -A INPUT -p tcp -m tcp --dport 19639 -j ACCEPT
253+
iptables -I INPUT -p tcp -s $ipMbilling --dport 3306 -j ACCEPT
254+
255+
256+
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections
257+
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections
258+
apt-get install -y iptables-persistent
259+
260+
sudo iptables-save > /etc/iptables/rules.v4
257261

258262
apt-get -y install fail2ban
259263
systemctl enable fail2ban

0 commit comments

Comments
 (0)