Is it possible to set a rate limit in all requests which are outgoing from my own local system? I want my server not to be banned or blocked by other servers.
I searched for a forward proxy with NGINX but didn’t find an official way to do that.
Maybe there is a way with ufw
or iptables
or anything?
Yes, you can limit it on NGINX server. You can configure NGINX as a proxy for all your outbound requests to external services and use module ngx_http_limit_req_module. Example of configuration and main idea, described in this article: https://www.monterail.com/blog/2011/outbound-api-rate-limits-the-nginx-way.
link to NGINX module: http://nginx.org/en/docs/http/ngx_http_limit_req_module.html