<div><span style="color:rgb(49,49,49);word-spacing:1px">Hi Luke</span><br style="color:rgb(49,49,49);word-spacing:1px"><br style="color:rgb(49,49,49);word-spacing:1px"><span style="color:rgb(49,49,49);word-spacing:1px">I quickly reviewed the code, and found this section intriguing:</span><br style="color:rgb(49,49,49);word-spacing:1px"><a href="https://github.com/gotthardp/rabbitmq-auth-backend-ip-range/blob/master/src/rabbit_auth_backend_ip_range.erl#L57-L60" rel="noreferrer" target="_blank" style="font-size:1rem;word-spacing:1px">https://github.com/gotthardp/rabbitmq-auth-backend-ip-range/blob/master/src/rabbit_auth_backend_ip_range.erl#L57-L60</a><br style="color:rgb(49,49,49);word-spacing:1px"><br style="color:rgb(49,49,49);word-spacing:1px"><span style="color:rgb(49,49,49);word-spacing:1px">How about just this instead:</span><br style="color:rgb(49,49,49);word-spacing:1px"><span style="color:rgb(49,49,49);word-spacing:1px">Addr == Mask,</span><br style="color:rgb(49,49,49);word-spacing:1px"><br style="color:rgb(49,49,49);word-spacing:1px"><br style="color:rgb(49,49,49);word-spacing:1px"><span style="color:rgb(49,49,49);word-spacing:1px">Anyway, thank you. If no one else has another alternative, I’m gonna hack this module a little bit to fit my needs.</span></div><div dir="auto"><br style="color:rgb(49,49,49);word-spacing:1px"><span style="color:rgb(49,49,49);word-spacing:1px">/Frank</span><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 25 oct. 2019 à 19:23, Luke Bakken <<a href="mailto:luke@bakken.io">luke@bakken.io</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Frank,<br>
<br>
You may be able to get some inspiration from this RabbitMQ plugin:<br>
<br>
<a href="https://github.com/gotthardp/rabbitmq-auth-backend-ip-range/" rel="noreferrer" target="_blank">https://github.com/gotthardp/rabbitmq-auth-backend-ip-range/</a><br>
<br>
Thanks,<br>
Luke<br>
<br>
On Fri, Oct 25, 2019 at 10:15 AM Frank Muller<br>
<<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>> wrote:<br>
><br>
> Hi guys<br>
><br>
> I’m looking for an Erlang module which let me authorize connexions based on an IP address or IP address range.<br>
><br>
> Examples:<br>
><br>
> . Rule 1: "51.121.92.25"<br>
><br>
> Only one IP address is allowed: 51.121.92.25<br>
><br>
> .  Rule 2: "51.121.*.25"<br>
><br>
> These IPs are all allowed:<br>
> 51.121.92.25<br>
> 51.121.91.25<br>
> 51.121.90.25<br>
> …<br>
><br>
> Would be great if the module can also validate the connection IP address. For now, I only deal with IP v4 addresses (but I’m open to support IP v6 in my code).<br>
><br>
> Thanks in advance<br>
> /Frank<br>
</blockquote></div></div>