How to access externally to consul UI

I run it as a docker image, i gave

docker pull consul

docker run -p 8500:8500 consul

and i am able to access the consul ui at http://<hostname>:8500/ui


You can use socat in this case.

socat -d -d TCP-L:8500,bind=172.16.93.128,fork TCP:localhost:8500 &

where 172.16.93.12 is my IP.


Add

{
  "client_addr": "0.0.0.0"
}

to your configuration or add the option -client 0.0.0.0 to the command line of consul to make your Web UI accessible from the outside (see the docs for more information).

Please note that this will also make your Consul REST API accessible from the outside. Depending on your environment you might want to activate Consul's ACLs to restrict access.

Tags:

Consul