0

I had set up rabbitmq server on a remote machine, now I want to restrict the client (producer/consumer) based on IP address to connect to rabbitmq. where consumers and producers are on different networks. Only allowed consumer/producer can publish/subscribe to queue. How to achieve this.

I had implemented simple producer/consumer code in nodejs aqmp library which works properly. Also, I had enabled the auth_backend_ip_range library on rabbitmq server.

But I don't know how to set only specific producer and consumer IP to connect it.

fortunee
  • 3,852
  • 2
  • 17
  • 29
mayur
  • 113
  • 1
  • 5
  • if there is not so much consumers/produces, you can setup firewall to allow specific ips or IP ranges to connect to your rabbitmq server – vodolaz095 Sep 14 '19 at 15:42
  • where do i need to specify these firewall rules. that only ip A can connect to queue and only ip B can consume to queue. – mayur Sep 15 '19 at 04:09
  • This is a duplicate of this https://stackoverflow.com/questions/41283877/restrict-access-to-rabbitmq-via-ip – Soumen Mukherjee Sep 15 '19 at 11:37
  • Possible duplicate of [Restrict access to RabbitMQ via IP](https://stackoverflow.com/questions/41283877/restrict-access-to-rabbitmq-via-ip) – Soumen Mukherjee Sep 15 '19 at 11:38
  • Please see this [Restrict Access to RabbitMQ Based on IP](https://stackoverflow.com/questions/41283877/restrict-access-to-rabbitmq-via-ip) – Soumen Mukherjee Sep 15 '19 at 11:39
  • [ {rabbit, [ {tcp_listeners, [5672]}, {auth_backends, [ {rabbit_auth_backend_internal, [rabbit_auth_backend_internal, rabbit_auth_backend_ip_range] } ] } ]}, {rabbitmq_auth_backend_ip_range, [ {tag_masks, [{'customtag', [<<"::FFFF:172.xx.xx.xxx">>]}]}, {default_masks, [<<"::0/0">>]} ]} ]. Yes. I tried this but it still accepting connections from other networks. I had updated my IP address in above code. – mayur Sep 15 '19 at 12:34

0 Answers0