Nginx Config Ipv6 default route allow http access?

Status
Not open for further replies.

Ramalama

Customer
Joined
Jun 8, 2022
Messages
14
Reaction score
2
geo $is_remote {
default 1;
192.168.0.0/16 0;
172.16.0.0/12 0;
10.0.0.0/8 0;
127.0.0.1 0;
::0/0 0;
}
if ($scheme = 'http'){
set $block_remote "1";
}
if ($is_remote){
set $block_remote "${block_remote}+1";
}
if ($block_remote = "1+1"){
return 403;
}

I searched and didn't found an answer to this, for me this is looking like a mistake or something.

::0/0 on ip6 is for me the equivalent for 0.0.0.0/0 on ip4
So for me that means that that block says, that every ipv6 adress is not counted as remote, so further down not getting redirected to 403.

Shouldn't that be fc00::/7 (rfc1918) and ::1/128 (link local)?

Cheers
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,322
Messages
591,883
Members
165,469
Latest member
footandankle.my3fcx.us