-
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
Consul does not initiate RPC connections from the 'bind' address or support 'source' address #2822
Labels
type/enhancement
Proposed improvement or new feature
Comments
Hi @rileyje thanks for opening an issue. It seems like we should be able to use the bind address so we don't need to introduce any additional configuration. |
Tested this as follows: Vagrantfile
build consul
consul nodes
On
On
|
magiconair
added a commit
that referenced
this issue
May 3, 2017
This patch configures consul to use the bind address as the source address for outgoing connections. Fixes #2822
magiconair
added a commit
that referenced
this issue
May 3, 2017
This patch configures consul to use the bind address as the source address for outgoing connections. Fixes #2822
magiconair
added a commit
that referenced
this issue
May 10, 2017
Use the bind address as source address for outgoing RPC connections unless it is INADDR_ANY. The current code uses the advertise address which will not work in certain environments where the advertise address is not routable in the network of the agent, e.g. NAT environment, container... After all, that is the purpose of the advertise address. See #2822
magiconair
added a commit
that referenced
this issue
May 10, 2017
Use the bind address as source address for outgoing RPC connections unless it is INADDR_ANY. The current code uses the advertise address which will not work in certain environments where the advertise address is not routable in the network of the agent, e.g. NAT environment, container... After all, that is the purpose of the advertise address. See #2822
magiconair
added a commit
that referenced
this issue
May 10, 2017
Use the bind address as source address for outgoing RPC connections unless it is INADDR_ANY. The current code uses the advertise address which will not work in certain environments where the advertise address is not routable in the network of the agent, e.g. NAT environment, container... After all, that is the purpose of the advertise address. See #2822
slackpad
pushed a commit
that referenced
this issue
May 12, 2017
Use the bind address as source address for outgoing RPC connections unless it is INADDR_ANY. The current code uses the advertise address which will not work in certain environments where the advertise address is not routable in the network of the agent, e.g. NAT environment, container... After all, that is the purpose of the advertise address. See #2822
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
consul version
for both Client and ServerServer: Consul v0.7.5
Client: NA
consul info
for ServerServer:
Operating system and Environment details
CentOS Linux release 7.3.1611 (Core)
Linux ip-172-18-1-175 3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Description of the Issue (and unexpected/desired result)
When the
-bind ip_addr
argument is passed to Consul, Consul still creates RPC connections to other servers from the default host address. For multi-homed hosts behind firewalls, especially if the default interface is dynamically configured, it would be useful if Consul initiated connections from the 'bind' address or supported a 'source' address option.Reproduction steps
Create a multi-server Consul cluster where at least one Consul server has multiple IP addresses on the same subnet. Pass Consul the '-bind ip_addr' argument where ip_addr is the second/non-default host address. On a non-leader server, query local Consul agent and observe network traffic to leader from default IP.
Command line:
Config:
The text was updated successfully, but these errors were encountered: