[syslog-ng] Multiple IP filters

Henning Markussen hm at mib.dk
Sat Mar 18 02:38:39 CET 2006


Hi

Just use

filter f_netdev { host("192.168.23.1$") or
                        host("192.168.23.2$") or
                        host("192.168.23.4$") or
                        host("192.168.23.8$") or
                        host("192.168.23.40") or
                        host("192.168.23.75"); };

- Henning

> I am trying to setup filters for multiple network devices.  Below are
> excerts to my syslog-ng.conf file.
>
> filter f_netdev { host("192.168.23.1") or
>                         host("192.168.23.2") or
>                         host("192.168.23.4") or
>                         host("192.168.23.8") or
>                         host("192.168.23.40") or
>                         host("192.168.23.75"); };
> destination d_host-date { file("/var/log/network/$HOST/$MONTH$DAY"
> group(watch) perm(0640)); };
>
> log { source(s_udp); filter(f_netdev); destination(d_host-date); };
>
> The problem is when I log host IPs, the filter for "192.168.23.1" includes
> "192.168.23.11", "192.168.23.12", "192.168.23.135", etc...
>
> How can I specify 192.168.23.1 only?
>
>
> ---------------------------------
>  Yahoo! Mail
>  Use Photomail to share photos without annoying
> attachments._______________________________________________
> syslog-ng maillist  -  syslog-ng at lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
>
>



More information about the syslog-ng mailing list