hier ein Ausschnitt aus meiner iptables config
Code: Alles auswählen
# Firewallregeln loeschen
iptables -F
iptables -X
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
# eigene Chains erstellen
iptables -N MYDROP
iptables -N MYACCEPT
# Loopback-Kommunikation
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
# Stateful Inspection
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state INVALID -j MYDROP
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# eigene Chains MYDROP und MYACCEPT konfigurieren
iptables -A MYDROP -j LOG --log-tcp-options --log-ip-options --log-prefix "FW-DROP: "
iptables -A MYDROP -j DROP
iptables -A MYACCEPT -j LOG --log-tcp-options --log-ip-options --log-prefix "FW-ACCEPT: "
iptables -A MYACCEPT -j ACCEPT
# Saemtlichen anderen traffic verbieten
iptables -A INPUT -j MYDROP
iptables -A OUTPUT -j MYDROP
1) er hier doch alles dropen; und zwar nach MYDROP
2) MYDROP den Vorfall loggen
Aber:
*) kein Vorkommen in /var/log/daemon.log
*) kein Vorkommen in /var/log/kern.log
*) kein Vorkommen in /var/log/messages
*) kein Vorkommen in /var/log/syslog
Code: Alles auswählen
# /etc/syslog.conf Configuration file for syslogd.
auth,authpriv.* -/var/logauth.log
*.*;auth,authpriv.none -/var/log/syslog
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
uucp.* -/var/loguucp.log
mail.info -/var/log/mail.info
mail.warn -/var/log/mail.warn
mail.err -/var/logmail.err
news.crit -/var/lognews/news.crit
news.err -/var/lognews/news.err
news.notice -/var/log/news/news.notice
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
*.emerg *
daemon.*;mail.*;\
news.crit;news.err;news.notice;\
*.=debug;*.=info;\
*.=notice;*.=warn |/dev/xconsole