我们可以使用 nginx 代理来隐藏来自外部 smtp (如 gmail)的原始服务器暴露吗?

我们可以使用 nginx 代理来隐藏来自外部 smtp (如 gmail)的原始服务器暴露吗?

因此,如果可能的话,我想在发送 SMTP 电子邮件(例如从 Gmail 发送)时隐藏我的原始服务器 IP 的暴露,因为我已经多次遭到 DDoS 攻击,仅仅是因为他们从电子邮件中获取 IP。

我也有 Cloudflare,但它仍然泄露了原始 IP。

那么,是否可以采取类似 proxypass 之类的措施来隐藏原始 IP 的暴露?如果可以,请帮助我。

这是我当前的设置,使用 nginx + centos 6。

server {
    listen       80;
    server_name  example.com www.example.com;
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    location / {
        root /var/www/example.com/html;
        index  index.php;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /var/www/example.com/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME /var/www/example.com/html$fastcgi_script_name;
    }

相关内容