Use 'map' to identify each subnet and this to limit:
https://docs.nginx.com/nginx/admin-guide/security-controls/controlling-access-proxied-http/#limit_conn
https://docs.nginx.com/nginx/admin-guide/security-controls/controlling-access-proxied-http/#limit_conn