Skip to content
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

IP client selector does not work in case of local clients (blacklist by 127.0.0.1) #14654

Closed
puzpuzpuz opened this Issue Mar 6, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@puzpuzpuz
Copy link
Contributor

puzpuzpuz commented Mar 6, 2019

I was running clients and members with 3.12-BETA-1 version locally. I configured client filtering with a blacklist for 127.0.0.1 IP and was expecting my clients to be blacklisted.

  • Expected result: client running on the same machine are blocked once the blacklist is applied.
  • Actual result: local clients aren't blocked.

The thing is client.getSocketAddress().getHostName() in the following line of code returns localhost instead of an IP address:

return AddressUtil.matchInterface(client.getSocketAddress().getHostName(), ipMask);

@puzpuzpuz puzpuzpuz added this to the 3.12 milestone Mar 6, 2019

@puzpuzpuz

This comment has been minimized.

Copy link
Contributor Author

puzpuzpuz commented Mar 6, 2019

cc @sancar

@sancar sancar self-assigned this Mar 6, 2019

sancar added a commit to sancar/hazelcast that referenced this issue Mar 6, 2019

Fix ClientSelectors.ipSelector with 127.0.0.1
Use ip representation of addresses instead of hostname to match
ip addresses provided by MC.

fixes hazelcast#14654

sancar added a commit to sancar/hazelcast that referenced this issue Mar 6, 2019

Fix ClientSelectors.ipSelector with 127.0.0.1
Use ip representation of addresses instead of hostname to match
ip addresses provided by MC.

fixes hazelcast#14654

@sancar sancar closed this in #14655 Mar 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.