SIP firewall

This commit is contained in:
Bob Mottram 2015-11-01 22:23:57 +00:00
parent 41fc1011e4
commit 44753855b3
1 changed files with 14 additions and 0 deletions

View File

@ -6170,6 +6170,19 @@ function configure_firewall_for_voip {
echo 'configure_firewall_for_voip' >> $COMPLETION_FILE echo 'configure_firewall_for_voip' >> $COMPLETION_FILE
} }
function configure_firewall_for_sip {
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" ]]; then
return
fi
if grep -Fxq "configure_firewall_for_sip" $COMPLETION_FILE; then
return
fi
iptables -A INPUT -p udp --dport $SIP_PORT -j ACCEPT
iptables -A INPUT -p tcp --dport $SIP_PORT -j ACCEPT
save_firewall_settings
echo 'configure_firewall_for_sip' >> $COMPLETION_FILE
}
function configure_firewall_for_ipfs { function configure_firewall_for_ipfs {
if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" ]]; then if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" ]]; then
return return
@ -11006,6 +11019,7 @@ configure_firewall_for_dns
configure_firewall_for_ftp configure_firewall_for_ftp
configure_firewall_for_web_access configure_firewall_for_web_access
configure_firewall_for_voip configure_firewall_for_voip
configure_firewall_for_sip
configure_firewall_for_avahi configure_firewall_for_avahi
configure_firewall_for_zeronet configure_firewall_for_zeronet
configure_firewall_for_ipfs configure_firewall_for_ipfs