系统环境:
- Ubuntu16.04
- Nginx version: nginx/1.14.0
- PHP 7.0.32-0ubuntu0.16.04.1 (cli) ( NTS )
1、安装v2ray后,发现wordpress无法访问

卸载v2ray:
其中 systemd 和 sysv 二选一,取决于你的系统。
#停用并卸载服务(systemd): systemctl stop v2ray systemctl disable v2ray #停用并卸载服务(sysv): service v2ray stop update-rc.d -f v2ray remove
删除文件:
rm -rf /etc/v2ray/* #(配置文件) rm -rf /usr/bin/v2ray/* #(程序) rm -rf /var/log/v2ray/* #(日志) rm -rf /lib/systemd/system/v2ray.service #(systemd 启动项) rm -rf /etc/init.d/v2ray #(sysv 启动项)
2、curl 127.0.0.1
网站正常返回html
3、curl localhost
网站正常返回html
4、curl 服务器ip 104.156.247.111 异常
curl 104.156.247.111
curl: (7) Failed to connect to 104.156.247.111 port 80: Connection refused
5、查看防火墙状态,关闭状态
查看防火墙状态:
ufw status
Status: inactive
开启防火墙
ufw enable
关闭防火墙
ufw disable
6.查看服务提供商是否有防火墙,无

7.重置路由表
iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT
8.最后wordpress可以访问了,原因是v2ray修改了路由表。
- 不要在生产环境下修改不相关配置
- 生产环境下改配置需要提前备份
参考:
http://insanelabs.net/linux/linux-reset-iptables-firewall-rules/
https://www.digitalocean.com/community/questions/port-80-failed-connection-refused
0 条评论