I'm using the ZMQ pattern dealer/router.In my project, a router is a server manager and a dealer is a client.
So I have many dealers and only one router.
Each dealer can send its own request along with its identity so that later on the router knows where to send the piece of information based on their identity. To be more specific the identity is a public key based on asymmetric encryption that both router and dealers come up with an agreement on before the handshake.
Everything runs smoothly and the router sends chunks of information on dealers based on their public key identities so we are all happy.
But!! What happened in the case that an attacker pretended dealers' identities by opening multiple connections and using their public keys as identities? How can we prevent a situation like this? How the router can identify this case? Is there any way for a router to check their IP and ban illegal IPs that are not known? I am so confused how can I come up with that riddle?
Thanks in advance