firewall: allow SNMP requests if cupsd service is available.

This commit is contained in:
Jeremy Gardais 2015-09-16 18:46:28 +02:00
parent bfadca762d
commit 5c5e0898d2
1 changed files with 8 additions and 5 deletions

View File

@ -165,8 +165,10 @@ fw_start() {
#### tftp allowed
#$IPT -A INPUT -j ACCEPT -p udp -i "${ILAN}" -d "${IPLAN}" --dport 69 -m state --state NEW -m comment --comment "TFTPD in"
if [ $(command -v cupsd) ]; then
#### Printers
$IPT -A INPUT -j ACCEPT -p udp -i "${ILAN}" -d "${IPLAN}" --sport 161 -m state --state NEW -m comment --comment "SNMP IN"
fi
#########################
## {Multi,Broad}cast ##
@ -255,9 +257,10 @@ fw_start() {
$IPT -A OUTPUT -j ACCEPT -p udp -o "${ILAN}" -s "${IPLAN}" --dport 32767 -m state --state NEW -m comment --comment "NFS mountd out"
fi
# #### Printers
# $IPT -A OUTPUT -j ACCEPT -p udp -o "${ILAN}" -s "${IPLAN}" --dport 161 -m state --state NEW -m comment --comment "SNMP OUT"
#
if [ $(command -v cupsd) ]; then
#### Printers
$IPT -A OUTPUT -j ACCEPT -p udp -o "${ILAN}" -s "${IPLAN}" --dport 161 -m state --state NEW -m comment --comment "SNMP OUT"
fi
}