]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
sysklogd: Fix sending packets to remove syslog servers
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 Jul 2026 16:09:12 +0000 (18:09 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 8 Jul 2026 16:09:12 +0000 (18:09 +0200)
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 <michael.tremer@ipfire.org>
src/initscripts/system/firewall
src/initscripts/system/sysklogd

index c7642282f6eb5d5a03d2ccb157dbf815883684f4..a97758dc371b9cddf2d00b1014ada562f39c47dd 100644 (file)
@@ -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
index c2531b1eb36b19ce91e92d3f2c12515d931bae0b..9263daf0cb8bdf57218ce1d7cb734be31ad5b16a 100644 (file)
@@ -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