{"action":"created","issue":{"url":"https://api.github.com/repos/sysown/proxysql/issues/1363","repository_url":"https://api.github.com/repos/sysown/proxysql","labels_url":"https://api.github.com/repos/sysown/proxysql/issues/1363/labels{/name}","comments_url":"https://api.github.com/repos/sysown/proxysql/issues/1363/comments","events_url":"https://api.github.com/repos/sysown/proxysql/issues/1363/events","html_url":"https://github.com/sysown/proxysql/issues/1363","id":293342510,"number":1363,"title":"proxy_addr rules only work if proxysql is bound to specific IP","user":{"login":"utdrmac","id":4413670,"avatar_url":"https://avatars1.githubusercontent.com/u/4413670?v=4","gravatar_id":"","url":"https://api.github.com/users/utdrmac","html_url":"https://github.com/utdrmac","followers_url":"https://api.github.com/users/utdrmac/followers","following_url":"https://api.github.com/users/utdrmac/following{/other_user}","gists_url":"https://api.github.com/users/utdrmac/gists{/gist_id}","starred_url":"https://api.github.com/users/utdrmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utdrmac/subscriptions","organizations_url":"https://api.github.com/users/utdrmac/orgs","repos_url":"https://api.github.com/users/utdrmac/repos","events_url":"https://api.github.com/users/utdrmac/events{/privacy}","received_events_url":"https://api.github.com/users/utdrmac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"renecannao","id":3645227,"avatar_url":"https://avatars3.githubusercontent.com/u/3645227?v=4","gravatar_id":"","url":"https://api.github.com/users/renecannao","html_url":"https://github.com/renecannao","followers_url":"https://api.github.com/users/renecannao/followers","following_url":"https://api.github.com/users/renecannao/following{/other_user}","gists_url":"https://api.github.com/users/renecannao/gists{/gist_id}","starred_url":"https://api.github.com/users/renecannao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renecannao/subscriptions","organizations_url":"https://api.github.com/users/renecannao/orgs","repos_url":"https://api.github.com/users/renecannao/repos","events_url":"https://api.github.com/users/renecannao/events{/privacy}","received_events_url":"https://api.github.com/users/renecannao/received_events","type":"User","site_admin":false},"assignees":[{"login":"renecannao","id":3645227,"avatar_url":"https://avatars3.githubusercontent.com/u/3645227?v=4","gravatar_id":"","url":"https://api.github.com/users/renecannao","html_url":"https://github.com/renecannao","followers_url":"https://api.github.com/users/renecannao/followers","following_url":"https://api.github.com/users/renecannao/following{/other_user}","gists_url":"https://api.github.com/users/renecannao/gists{/gist_id}","starred_url":"https://api.github.com/users/renecannao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renecannao/subscriptions","organizations_url":"https://api.github.com/users/renecannao/orgs","repos_url":"https://api.github.com/users/renecannao/repos","events_url":"https://api.github.com/users/renecannao/events{/privacy}","received_events_url":"https://api.github.com/users/renecannao/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-01-31T22:56:29Z","updated_at":"2018-05-02T15:56:32Z","closed_at":null,"author_association":"NONE","body":"We are using ProxySQL in HA configuration (2 servers) using keepalived to handle VIP management. We want to do filtering based on which IP the client connects. If the client connects to VIP 10.65.0.72, that should send traffic to mysql A, and if client connects to 10.65.0.73, mysql B.\r\n\r\nWe have the following query rules:\r\n\r\n```\r\n+---------+--------+------------+------------+----------------------+-----------------------+-------+\r\n| rule_id | active | proxy_addr | proxy_port | match_digest         | destination_hostgroup | apply |\r\n+---------+--------+------------+------------+----------------------+-----------------------+-------+\r\n| 102     | 1      | 10.65.0.72 | 3306       | ^SELECT              | 11                    | 1     |\r\n| 202     | 1      | 10.65.0.73 | 3306       | ^SELECT              | 21                    | 1     |\r\n+---------+--------+------------+------------+----------------------+-----------------------+-------+\r\n```\r\n\r\nThe bug is that if mysql_interfaces is set to \"0.0.0.0:3306\" (ie: listen on all interfaces) then the above query rules fail to match on proxy_addr.\r\n\r\nIf I `SET mysql-interfaces = \"10.65.0.72:3306;10.65.0.73:3306\";` and then restart proxysql, **THEN** the above rules work just fine.\r\n\r\nproxy_addr matching should not be dependent on which interfaces proxysql is bound. Is this a limitation in the tcp/ip stack?\r\n"},"comment":{"url":"https://api.github.com/repos/sysown/proxysql/issues/comments/386028164","html_url":"https://github.com/sysown/proxysql/issues/1363#issuecomment-386028164","issue_url":"https://api.github.com/repos/sysown/proxysql/issues/1363","id":386028164,"user":{"login":"jsfrerot","id":3996547,"avatar_url":"https://avatars1.githubusercontent.com/u/3996547?v=4","gravatar_id":"","url":"https://api.github.com/users/jsfrerot","html_url":"https://github.com/jsfrerot","followers_url":"https://api.github.com/users/jsfrerot/followers","following_url":"https://api.github.com/users/jsfrerot/following{/other_user}","gists_url":"https://api.github.com/users/jsfrerot/gists{/gist_id}","starred_url":"https://api.github.com/users/jsfrerot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsfrerot/subscriptions","organizations_url":"https://api.github.com/users/jsfrerot/orgs","repos_url":"https://api.github.com/users/jsfrerot/repos","events_url":"https://api.github.com/users/jsfrerot/events{/privacy}","received_events_url":"https://api.github.com/users/jsfrerot/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T15:56:32Z","updated_at":"2018-05-02T15:56:32Z","author_association":"NONE","body":"Hi, is there a fix incoming for this? As it would be very useful to bind to 0.0.0.0 and use the proxy_addr feature."}}
{"actor":{"display_login":"jsfrerot"}}