This is a continuation of my previous thread which Badger kindly solved.
I have sflow data coming in with the src_ip and dst_ip fields
My internal networks are in this range and I'd like them not to be scanned for geoip:
filter {
cidr {
add_tag => [ "Internal1" ]
address => [ "%{src_ip}", "%{dst_ip}" ]
network => [ "192.168.0.0/17" ]
}
}
filter {
cidr {
add_tag => [ "Internal2" ]
address => [ "%{src_ip}", "%{dst_ip}" ]
network => [ "192.168.128.0/17" ]
}
}
I've tried this and it's not working, it tags external ip addresses as local and doesn't check for geoip
filter{
if "Internal1" in [tags] or "Internal2" in [tags] {
mutate {
add_tag => "Local"}
}
else {
geoip {
default_database_type => "ASN"
add_tag => [ "GeoIP-DST" ]
source => "dst_ip"
target => "destination"
}
geoip {
default_database_type => "ASN"
add_tag => [ "GeoIP-SRC"]
source => "src_ip"
target => "source"
}
}
}
Thanks