Nginx allow ip. 0/16; allow 2001:0db8::/32; deny all; The rules are checked in sequence ...