create_set allowed_udp bitmap:port range 0-65535
create_set allowed_tcp bitmap:port range 0-65535
-# common services
-allow_services ssh smtp submission domain ntp
-
-# per-host services
-srv_file="services.$(hostname -s)"
-if [ -e "${srv_file}" ]
-then
- . "${srv_file}"
-fi
+for sfx in '' ".$(hostname -s)"
+do
+ if [ -e "services${sfx}" ]
+ then
+
+ for l in $(decommentcat "services${sfx}")
+ do
+ allow_services "${l}"
+ done
+ fi
+done
$IPTABLES -A INPUT -i "${EXT_IF}" -p tcp -m set --match-set allowed_tcp dst -j ACCEPT
$IPTABLES -A INPUT -i "${EXT_IF}" -p udp -m set --match-set allowed_udp dst -j ACCEPT