gpt-2741gnac_root_files/_mtdblock5.img.extracted/squashfs-root/usr/script/fw_stop.sh
2023-11-26 03:26:24 -03:00

54 lines
2.2 KiB
Bash
Executable file

#!/bin/sh
PROFILE_CFG=/userfs/profile.cfg
if [ -f $PROFILE_CFG ] ; then
chmod 777 $PROFILE_CFG
. $PROFILE_CFG
fi
/bin/echo 1 > /proc/sys/net/ipv4/tcp_syncookies
/bin/echo 128 > /proc/sys/net/ipv4/tcp_max_syn_backlog
/bin/echo 60 > /proc/sys/net/netfilter/nf_conntrack_tcp_timeout_syn_recv
#krammer
#iptables -t filter -F FIREWALL
#iptables -t filter -Z FIREWALL
if [ "$MSTC_FIREWALL_CUSTOMIZATION" != "" ] ;then
iptables -t filter -F FrwlInChk
iptables -t filter -F FrwlOutChk
iptables -t filter -F FrwlForwardInChk
iptables -t filter -D INPUT -j FrwlInChk
iptables -t filter -D OUTPUT -j FrwlOutChk
iptables -t filter -D FORWARD -j FrwlForwardInChk
iptables -t filter -Z FrwlInChk
iptables -t filter -Z FrwlForwardInChk
iptables -t filter -Z FrwlOutChk
iptables -t filter -F AppFrwlInChk 2>/dev/null
iptables -t filter -F AppFrwlOutChk 2>/dev/null
iptables -t filter -F AppForward 2>/dev/null
iptables -t filter -F AppFrwlForwardInChk 2>/dev/null
iptables -t filter -F AppFrwlForwardOutChk 2>/dev/null
iptables -t filter -D INPUT -j AppFrwlInChk 2>/dev/null
iptables -t filter -D OUTPUT -j AppFrwlOutChk 2>/dev/null
iptables -t filter -D FORWARD -j AppForward 2>/dev/null
iptables -t filter -X AppFrwlInChk 2>/dev/null
iptables -t filter -X AppFrwlOutChk 2>/dev/null
iptables -t filter -X AppForward 2>/dev/null
iptables -t filter -X AppFrwlForwardInChk 2>/dev/null
iptables -t filter -X AppFrwlForwardOutChk 2>/dev/null
iptables -t filter -D FORWARD -i ! br+ -p udp -m iprange --dst-range 224.0.0.0-239.255.255.255 -j RETURN
else
iptables -t filter -F FIREWALL_INPUT
iptables -t filter -Z FIREWALL_INPUT
iptables -t filter -F FIREWALL_FORWARD
iptables -t filter -Z FIREWALL_FORWARD
fi
if [ "$MSTC_GVT_TR181_FIREWALL" != "" ] || [ "$MSTC_SOPHIA_COMMON_TR181_FIREWALL" != "" ] ;then
iptables -t filter -F TR181FrwlInput
iptables -t filter -F TR181FrwlOutput
iptables -t filter -F TR181FrwlForward
iptables -t filter -D INPUT -j TR181FrwlInput
iptables -t filter -D OUTPUT -j TR181FrwlOutput
iptables -t filter -D FORWARD -j TR181FrwlForward
iptables -t filter -Z TR181FrwlInput
iptables -t filter -Z TR181FrwlOutput
iptables -t filter -Z TR181FrwlForward
iptables -t filter -D FORWARD -i ! br+ -p udp -m iprange --dst-range 224.0.0.0-239.255.255.255 -j RETURN
fi