best practices for accessing elasticsearch on proxmox ct

emileplas

New Member
Feb 21, 2022
1
0
1
30
Hey everyone!

I am running elasticsearch and kibana on a ct on my proxmox server. In order to let users of my webapp use the elasticsearch server, I need a public access to elasticsearch. What are the best practices to set this up? Do I just do a port forward to the elasticsearch ct or are there other best practices that need to be taken into account?

Thank you in advance and kind regards.
Emile
 
hi,

I need a public access to elasticsearch. What are the best practices to set this up? Do I just do a port forward to the elasticsearch ct or are there other best practices that need to be taken into account?
yeah, you can make a portforward to your container's IP address and the port for the elastic search. you can take a look here [0] if you only have a single public IP address available for your node.

for the actual port forwarding basically you can just run an iptables command:
Code:
INTERFACE=enp1s0 # change this to your interface's name, check with 'ip a'
EXT_PORT=${1}
INTERN_IP=${2}
INTERN_PORT=${3}
iptables -t nat -A PREROUTING -i $INTERFACE -p tcp --dport $EXT_PORT -j DNAT --to $INTERN_IP:$INTERN_PORT

if you need to forward a udp port, change the -p tcp part to [/icode]-p udp[/icode]

[0]: https://pve.proxmox.com/wiki/Networ...ith_tt_span_class_monospaced_iptables_span_tt
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!