I was getting myself familiar with Consul services and trying things out. However, until now I couldn't find a way to allow specific subnets to send requests to Consul server.
here is my basic consul config.json:
{
"server": true,
"datacenter":"dc1",
"data_dir":"/opt/consul",
"bind_addr":"{{ ansible_ssh_host }}",
"client_addr": "0.0.0.0",
"bootstrap_expect": 1,
"node_name": "consul_server",
"ui": true,
"encrypt":"",
"acl" : {
"enabled" : true,
"default_policy" : "deny",
"down_policy" : "extend-cache"
}
}
in this case, client_addr is set to anywhere 0.0.0.0. How can I set it to something like 10.10.4.0/24 10.10.2.0/24 or 10.10.0.0/16?