]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/firewall/firewall-policy
syslog: Listen to network and block access from anywhere but localhost
[people/pmueller/ipfire-2.x.git] / config / firewall / firewall-policy
index c0a526f225e7a1d9ad763dc15f5e6d73c95ccfb1..078c3c515c31f1f385a2159f83fb5c6c52f5e89f 100755 (executable)
@@ -57,6 +57,18 @@ HAVE_OPENVPN="true"
 
 # INPUT
 
+# Drop syslog from anywhere but localhost
+# sysklogd cannot bind to specific interface and therefore we need to
+# block access by adding firewall rules
+case "${FWPOLICY}" in
+       REJECT)
+               iptables -A POLICYIN -p udp --dport 514 -j REJECT --reject-with icmp-host-unreachable
+               ;;
+       *)
+               iptables -A POLICYIN -p udp --dport 514 -j DROP
+               ;;
+esac
+
 # Allow access from GREEN
 if [ -n "${GREEN_DEV}" ]; then
        iptables -A POLICYIN -i "${GREEN_DEV}" -j ACCEPT