# Private networks with GeoIP

**URL:** <https://discuss.elastic.co/t/private-networks-with-geoip/138099>\
**Category:** Logstash\
**Created:** [July 1, 2018, 9:14pm UTC](https://discuss.elastic.co/t/private-networks-with-geoip/138099 "2018-07-01T21:14:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![marcelo](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@marcelo](https://discuss.elastic.co/u/marcelo)\
**Post date:** [July 2, 2018, 11:01pm UTC](https://discuss.elastic.co/t/private-networks-with-geoip/138099/3 "2018-07-02T23:01:44Z")

</div>

> [@marcelo](#):
>
> if [clientip] =~ /^192.168.254.\*/ { mutate { replace =\> { "[geoip][timezone]" =\> "America/Recife" } } mutate { replace =\> { "[geoip][continent\_code]" =\> "SA" } } mutate { replace =\> { "[geoip][country\_name]" =\> "Brazil" } } mutate { replace =\> { "[geoip][region\_code]" =\> "PE" } } mutate { replace =\> { "[geoip][country\_code2]" =\> "BR" } } mutate { replace =\> { "[geoip][country\_code3]" =\> "BR" } } mutate { replace =\> { "[geoip][region\_name]" =\> "RECIFE" } } mutate { remove\_field =\> ["[geoip][location]" ] } mutate { add\_field =\> { "[geoip][location]" =\> "-34,88" } } mutate { add\_field =\> { "[geoip][location]" =\> "-8,05" } } mutate { convert =\> ["[geoip][location]","float" ] } mutate { replace =\> ["[geoip][latitude]","-8,05" ] } mutate { convert =\> ["[geoip][latitude]","float" ] } mutate { replace =\> ["[geoip][longitude]","-34,88" ] } mutate { convert =\> ["[geoip][longitude]","float" ] } }

i've read the topic [could-not-index-event](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-in-es-6-0-0/111325/11) and in stackoverflow topic -\> [logstash-geoip-location-mapping-to-geo-point-not-working](https://stackoverflow.com/questions/42772022/logstash-geoip-location-mapping-to-geo-point-not-working) and understood my problem.

My index was populated with location field, when i changed my index the location field become populated with my data.

thanks.

---

_[View the full topic](https://discuss.elastic.co/t/private-networks-with-geoip/138099)._
