Skip to content

Instantly share code, notes, and snippets.

@anandtripathi5
Last active June 12, 2018 12:38
Show Gist options
  • Save anandtripathi5/82832d359e4ad9179e20da919862bf6b to your computer and use it in GitHub Desktop.
Save anandtripathi5/82832d359e4ad9179e20da919862bf6b to your computer and use it in GitHub Desktop.
Configure rabbitmq community plugin rabbitmq_auth_backend_ip_range on ubuntu

Rabbitmq-auth-backend-ip-range link is community plugin for client authorization based on source IP address. With this community plugin, we can restrict access to client on the basis of IP address

Steps To configure plugin in rabbitmq version 3.6.X

[
{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">>]}
]}
].
  • this configuration will effect in such a way that the user with tag customtag will able to connect to rabbitmq server with IP address 172.xx.xx.xxx and all other tags can access from any IP address
  • sudo service rabbitmq-server restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment