From: Michael Tremer Date: Wed, 8 Jul 2026 16:09:12 +0000 (+0200) Subject: sysklogd: Fix sending packets to remove syslog servers X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b037dabdede25400ee177f6e58152bd1528288a5;p=ipfire-2.x.git sysklogd: Fix sending packets to remove syslog servers When sysklogd binds to localhost, it will try to use that socket to reach any remove syslog servers which fails because of obvious reasons. Therefore we will have to let sysklogd bind to 0.0.0.0 and we create a separate firewall so that we won't accept any packets from the network but localhost which is accepted in the LOOPBACK chain. Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/system/firewall b/src/initscripts/system/firewall index c7642282f..a97758dc3 100644 --- a/src/initscripts/system/firewall +++ b/src/initscripts/system/firewall @@ -322,6 +322,12 @@ iptables_init() { iptables -A GUIINPUT -i "${GREEN_DEV}" -p tcp --dport 444 -j ACCEPT fi + # Drop any messages to syslog + iptables -N SYSLOG + iptables -A SYSLOG -p udp --dport 514 -j DROP + iptables -A SYSLOG -p tcp --dport 514 -j DROP + iptables -A INPUT -j SYSLOG + # WIRELESS chains iptables -N WIRELESSINPUT iptables -A INPUT -m conntrack --ctstate NEW -j WIRELESSINPUT diff --git a/src/initscripts/system/sysklogd b/src/initscripts/system/sysklogd index c2531b1eb..9263daf0c 100644 --- a/src/initscripts/system/sysklogd +++ b/src/initscripts/system/sysklogd @@ -25,7 +25,7 @@ case "${1}" in start) boot_mesg "Starting system log daemon..." - loadproc syslogd -m 0 -r -k -b 127.0.0.1 + loadproc syslogd -m 0 -r -k boot_mesg "Saving Bootlog..." if [ -e /var/log/bootlog ]; then