Hi,<br><br>I am implementing support for IP address country geolocation in Suricata, and I wanted to ask your opinion about the syntax to be used for the geoip keyword options.<br><br><div style="margin-left:40px"><a href="https://redmine.openinfosecfoundation.org/issues/559">https://redmine.openinfosecfoundation.org/issues/559</a><br>
</div><br>The keyword options would be:<br><ul><li>Country code. ie: US</li><li>Match condition: match on source IP, match on destination IP, or match on both.</li></ul>
What do you think would be the best syntax for this?<br><br>Some possibilities:<br><ul><li>geoip:<src|dst|both>,<countrycode>;</li><ul><li>alert http any any -> any any (msg:"GEOIP: IP located in US";<b>geoip:src,US</b>;sid:3450002;rev:1;)<br>
</li></ul><li>geoip:<countrycode>,<src|dst|both>;</li><ul><li>alert http any any -> any any (msg:"GEOIP: IP located in US";<b>geoip:US,src</b>;sid:3450002;rev:1;)</li></ul></ul><br>Regards,<br><br>
  I. Sanchez<br><br><br>