Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Użytkownik

Witam chciałem zacząć używać syslog-ng do filtrowania części logów. Wersja syslog-ng 3.1 Dodałem wszystko do oryginalnego pliku konfiguracyjnego
stworzyłem reguły przeznaczenia:
# # PLIKI LOGOW FIREWALLA # #
destination df_http { file("/var/log/firewall/iptables_http.log"); };
destination df_ftp { file("/var/log/firewall/iptables_ftp.log"); };
destination df_smtp { file("/var/log/firewall/iptables_smtp.log"); };
destination df_ssh { file("/var/log/firewall/iptables_ssh.log"); };
destination df_reszta { file("/var/log/firewall/iptables_reszta.log"); };reguły filtrów:
filter f_debug_ipt { level(debug); };
# # FILTRY DLA POSZCZEGOLNYCH RODZAJOW RUCHU (dla logow z iptables) # #
filter f_http { match("regexp" value('\^IPT\.http\.\[')); };
filter f_ftp { match("regexp" value('\^IPT\.ftp\.\[')); };
filter f_smtp { match("regexp" value('\^IPT\.smtp\.\[')); };
filter f_ssh { match("regexp" value('\^IPT\.ssh\.\[')); };
filter f_reszta { match("regexp" value('\^IPT\.polaczenia\.\[')); };
filter f_nie_firewall { not match("regexp" value('\^IPT\.')); };oraz log path:
# # LOGI Z FIREWALLA # #
# http
log {
source(s_src);
filter(f_debug_ipt);
filter(f_http);
destination(df_http);
};
# ftp
log {
source(s_src);
filter(f_debug_ipt);
filter(f_ftp);
destination(df_ftp);
};
# smtp
log {
source(s_src);
filter(f_debug_ipt);
filter(f_smtp);
destination(df_smtp);
};
# ssh
log {
source(s_src);
filter(f_debug_ipt);
filter(f_ssh);
destination(df_ssh);
};
# reszta
log {
source(s_src);
filter(f_debug_ipt);
filter(f_reszta);
destination(df_reszta);
};Restart syslog-ng, brak błędów, ale logi z firewalla nie zapisują się tam gdzie chciałem, w suslogu też już ich nie ma :/ A potrzebuje mieć te wpisy.
Z góry dziękuję za pomoc
Pozdrawiam
Offline



Użytkownik

Użytkownik


czy syslog-ng ma prawo pisania w
/var/log/firewall/
dla testów użyj loggera
logger kod ktory ma byc wrzucony do systemu logowania i zlapany przez regexp
no i nie zapomnij o logrotate :)
Ostatnio edytowany przez Nicram (2011-10-21 21:18:20)
Offline