server { . . . if ( $ip2location_country_code = CN ) { set $need_block Y; } if ( $remote_addr = 1.2.3.4 ) { set $need_block N; } if ( $need_block = Y ) { return 403; break; } . . . }