diff --git a/firewall b/firewall index e63e461..f8ffb97 100755 --- a/firewall +++ b/firewall @@ -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" - #### Printers - $IPT -A INPUT -j ACCEPT -p udp -i "${ILAN}" -d "${IPLAN}" --sport 161 -m state --state NEW -m comment --comment "SNMP 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 }