X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=firewall.sh;h=356075c424f98eb5d40a071a543455ba17a018a1;hb=3943c9626bd2f4b0829c666406340852cfca66e8;hp=eab2cb3404574a08d4f8b914022ee7c3d7ef9786;hpb=26febd7376e8c1679d5d088d71d73bc64585ec1e;p=firewall-squeep diff --git a/firewall.sh b/firewall.sh index eab2cb3..356075c 100755 --- a/firewall.sh +++ b/firewall.sh @@ -74,21 +74,28 @@ done 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 $IP6TABLES -A INPUT -i "${EXT_IF}" -p tcp -m set --match-set allowed_tcp dst -j ACCEPT $IP6TABLES -A INPUT -i "${EXT_IF}" -p udp -m set --match-set allowed_udp dst -j ACCEPT +create_drop_chain xenophobe + +# insert asia blocker +./sinokorea.sh + # insert persistent-pest-blocker ./xenophobe.sh