I want to run my elasticsearch server behind vpn.
I have a elasticsearch and vpn server.I want to create a transport client via vpn in my server.My server is not connected to vpn.I want to only create a transport client.
Vpn IP is added to ES security group.VPN server has a public port.
My server will create a transport client via VPN.Is it possible?
Now My transport client code is below.I change host and port with my vpn host and port?
But not connected. How can i configure?
Settings settings = Settings.settingsBuilder().put(ElasticSearchReservedWords.CLUSTER_NAME.getText(), LogHandlerConstants.CLUSTER_NAME)
.put(ElasticSearchReservedWords.LISTENER_TRANSPORT_SNIFF.getText(), true).build();
Client transportClient = TransportClient.builder().settings(settings).build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(elasticsearch_host), Integer.valueOf(9300)))
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(elasticsearch_host), Integer.valueOf(9301)));