-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for binding client interface(s) to multiple addresses #473
Comments
This is possible but difficult as it requires everywhere that a single listener is used to support N listeners. |
So it is impossible right now to have consul client HTTP API accessible on localhost and on the machines global IP? |
Lemme know if there is an easier way, but I set up consul to bind on localhost (the default) and then used socat -d -d TCP-L:8500,bind=10.128.1.72,fork TCP:localhost:8500 Where Also had to set |
+1 for this feature, same usecase and we'd like to avoid using socat or iptables on top of consul just to redirect the traffic |
Adding my vote for this feature. This is causing us pain because we want the Consul Web UI to be accessible from other machines (no just localhost) but changing the HTTP bind address requires an extra argument to every command line tool that uses the HTTP API and assumes localhost. |
Same situation here. I have Consul and Registrator both in Docker containers with Inside a container (with curl Consul's api from the host by getting Docker's bridge ( |
I'd also like to see the unix domain socket be supported along with the list of listening addresses. |
Would be a good option |
@blalor I'm inferring from your original post that you run consul in docker with --net=host. I think there is a workaround if you use --net=bridge:
|
I ran across this one today using addresses->http so I can access the Web UI on server1.
Local
Switching http to 0.0.0.0 actually fixed this by binding to all network interfaces, so now I can use 127.0.0.1 and 10.xx.xx.xx to connect to HTTP. This is slightly different than client_addr above, and is different than some users requests where they would like to bind to explicitly 2 IPs, but maybe not all IPs. This might be worth calling out in the documentation for the addresses section because in the bind section, the use of 0.0.0.0 is different:
Suggest adding to the |
Believe the behavior of the
|
I wonder if that's left to a system call and OS implementation. On CentOS 7, setting client_addr to 0.0.0.0 is binding to all interfaces for me and fixed the above scenario where |
Hi all, +1 for this feature. It would be very useful in my case. I need Consul servers to be listening in 2 of 3 different interfaces. |
+1 - I have a set of servers on a different subnet, and it would be nice to be able to configure multiple interfaces for them. My use case would also be solved by being able to specify an outbound interface and an inbound interface. Also, if you have multiple interfaces on a machine and you try to bind to
|
set client address to |
Is there a way to specify the bind port and client port for the agent similar to http port? |
+1 as well. I need to be able to run local for most things, but the UI on the external port. |
+1 for this request I'm in a hybrid cloud and this feature is essential for me. |
👍 pretty much required |
In your confit you can now add an undocumented (yet) flag: |
Is this issue still active? I have configured
|
Closing this as a duplicate of #2217, since there's an active PR against that one. |
check that git tag == chart tag on tagged releases
Update CircleCI to use Consul 1.9.4
In a containerized (ok, fine: "Docker") environment, I want to expose the consul agent to applications running in containers, but I'm uncomfortable exposing it to the entire world. Unfortunately, those are the only real options unless I want to muck about with iptables (which, trust me, I very much do not). I'd like to be able to specify multiple addresses in the config file as an array (
"client_addrs": ["127.0.0.1", "172.42.17.1"]
), and that implies multiple-client
command-line flags. Related (in my head, anyway) to #421.The text was updated successfully, but these errors were encountered: