# Elasticsearch and openvpn

**URL:** <https://discuss.elastic.co/t/elasticsearch-and-openvpn/10891>\
**Category:** Elasticsearch\
**Created:** [February 25, 2013, 7:19pm UTC](https://discuss.elastic.co/t/elasticsearch-and-openvpn/10891 "2013-02-25T19:19:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![courtenay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/courtenay/32/1933_2.png) [@courtenay](https://discuss.elastic.co/u/courtenay)\
**Post date:** [February 25, 2013, 7:19pm UTC](https://discuss.elastic.co/t/elasticsearch-and-openvpn/10891/1 "2013-02-25T19:19:39Z")

</div>

Hey all,

We recently had cause to run our elasticsearch cluster on two different  
security groups on AWS (security groups are like firewalled VPNs). I used  
openVPN and IPtables to get it all working, and wrote it all up in a blog  
post [http://c3x.me/code/2013/02/24/bridging-aws-security-groups-with-openvpn-for-elasticsearch/](http://c3x.me/code/2013/02/24/bridging-aws-security-groups-with-openvpn-for-elasticsearch/)

I figure this might help someone, some day 😉 the magic was in getting the  
routing working because of the way ES nodes advertise their IP address once  
you connect. I originally tried the various network and host config  
directives, but it didn't work - IPtables worked swimmingly and we were  
able to migrate our ~50gb cluster across the vpn without (much) downtime.

-- Courtenay

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:49am UTC](https://discuss.elastic.co/t/elasticsearch-and-openvpn/10891/2 "2017-07-06T02:49:38Z")

</div>


