mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
syslog: Listen to network and block access from anywhere but localhost
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user