# Allow IPv6/Mask

**URL:** <https://www.ruby-forum.com/t/allow-ipv6-mask/224726>\
**Category:** NGINX\
**Created:** [November 23, 2012, 1:26pm UTC](https://www.ruby-forum.com/t/allow-ipv6-mask/224726 "2012-11-23T13:26:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 23, 2012, 1:26pm UTC](https://www.ruby-forum.com/t/allow-ipv6-mask/224726/1 "2012-11-23T13:26:23Z")

</div>

Hi

I wan’t to allow just the local-IPv4-Subnet. Something like this:

listen \*:80;  
allow 192.168.42.0/24;  
deny all;

After switching to IPv6-Dual-Layer I tried this …

listen [::]:80;  
allow ::ffff:192.168.42.0/120;  
deny all;

It doesn’t work as expected. No one can see the page.  
The following works:

listen [::]:80;  
allow ::ffff:c0a8:2a00/120;  
deny all;

In my opinion there should be a warning at the second. But it fails  
silently.

Should I post a bug-report for this?

Micha

---

<div class="post-metadata">

**Author:** ![Micha\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/97f17d/32.png) [@Micha\_G](https://www.ruby-forum.com/u/Micha_G)\
**Post date:** [November 23, 2012, 1:31pm UTC](https://www.ruby-forum.com/t/allow-ipv6-mask/224726/2 "2012-11-23T13:31:04Z")

</div>

My fault both 2. and 3. doesn’t work.

How is the correct notation?

Micha

2012/11/23 Micha G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Micha\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/97f17d/32.png) [@Micha\_G](https://www.ruby-forum.com/u/Micha_G)\
**Post date:** [November 23, 2012, 1:37pm UTC](https://www.ruby-forum.com/t/allow-ipv6-mask/224726/3 "2012-11-23T13:37:29Z")

</div>

On Nov 23, 2012, at 16:30 , Micha G. wrote:

> My fault both 2. and 3. doesn’t work.
> 
> How is the correct notation?

allow 192.168.42.0/24;

nginx tests both IPv4 and IPv4 mapped to IPv6 addresses  
with this single rule.

–  
Igor S.

> **[F5 NGINX: Built for cloud-native apps. Ready for AI traffic.](https://www.f5.com/products/nginx)**
>
> Deliver modern applications with NGINX. Explore high-performance load balancing, API gateways, and web server solutions trusted by top global enterprises.
