Accessing Consul from a Nomad task with Consul Connect

I am using consul connect for two services and using bridge network as suggested. From the service scheduled as a Nomad container task, how can I access Consul that is on the host machine? I’ve not had luck with localhost,, or host.docker.internal.

For context, I’m using:
Ubuntu 22.04
Nomad 1.4.3
Consul 1.14.3

Hi @rajesh1, since the Consul agent is likely bound to localhost on the Host machines network namespace, it is not accessible from within the network namespace of the bridge network.

In an ideal world, Consul itself would be connect native, enabling the Consul agent to participate in the Connect service mesh automagically. Unfortunately this is not the case. Instead, you’ll need to setup a terminating gateway with Consul as a destination service, bridging the gap between your Connect service and the Consul agent.

Appreciate the suggestion. Working to set it up.