我运行以下 iptables 命令来启动 pptp 服务器:
iptables -A INPUT -i venet0 -p tcp --dport 1723 -j ACCEPT
iptables -A INPUT -i venet0 -p gre -j ACCEPT
iptables -A FORWARD -i ppp0 -o venet0 -j ACCEPT
iptables -A FORWARD -i venet0 -o ppp0 -j ACCEPT
iptables -t nat -A POSTROUTING -j SNAT --to-source 33.122.21.177
但它损坏了 php-fpm 服务。 Nginx 返回错误“502 Bad Gateway”。 Nginx 错误日志告诉你
failed (104: Connection reset by peer) while reading response header from upstream, client: 199.239.99.13, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000"
php-fpm服务正常运行
service php-fpm status
php-fpm (pid 14157) is running...
你能告诉我如何解决这个问题吗?
答案1
我找到了解决方案。
我只需要运行命令
iptables -t nat -D POSTROUTING -j SNAT --to-source 33.122.21.177