Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装配置完成后,不能连接网络,显示target machine actively refused it #762

Closed
dancorpse opened this issue Dec 4, 2017 · 10 comments

Comments

@dancorpse
Copy link

dancorpse commented Dec 4, 2017

1提交 Issue 之前请先阅读 Issue 指引,然后回答下面的问题,谢谢。
除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)

    服务器系统 Centos 6 x 86 vr2ay 版本 v3.0
    客户端 v2ray core 版本 v3.0,windows v2rayN 1.20
    浏览器firefox, 代理勾选手动 socks5, 并且勾选 Proxy DNS when using SOCKS v5

  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。

    使用firefox 通过socks/vmess ,任何网页都打不开, 比如试图打开google

  3. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)

    The connection was reset

The connection to the server was reset while the page was loading.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

  1. 你期待看到的正确表现是怎样的?
    正确打开网页

  2. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

    服务器端配置:

    // 在这里附上服务器端配置文件
{
    "log": {
        "access": "/var/log/v2ray/access.log",
        "error": "/var/log/v2ray/error.log",
        "loglevel": "warning"
    },
    "inbound": {
        "port": xxxx,
        "protocol": "vmess",
        "settings": {
            "clients": [
                {
                    "id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx",
                    "level": 1,
                    "alterId": 64
                }
            ]
        }
    },
    "outbound": {
        "protocol": "freedom",
        "settings": {}
    },
    "inboundDetour": [],
    "outboundDetour": [
        {
            "protocol": "blackhole",
            "settings": {},
            "tag": "blocked"
        }
    ],
    "routing": {
        "strategy": "rules",
        "settings": {
            "rules": [
                {
                    "type": "field",
                    "ip": [
                        "0.0.0.0/8",
                        "10.0.0.0/8",
                        "100.64.0.0/10",
                        "127.0.0.0/8",
                        "169.254.0.0/16",
                        "172.16.0.0/12",
                        "192.0.0.0/24",
                        "192.0.2.0/24",
                        "192.168.0.0/16",
                        "198.18.0.0/15",
                        "198.51.100.0/24",
                        "203.0.113.0/24",
                        "::1/128",
                        "fc00::/7",
                        "fe80::/10"
                    ],
                    "outboundTag": "blocked"
                }
            ]
        }
    }
}
客户端配置:
    // 在这里附上客户端配置
{
  "log": {
    "access": "Vaccess.log",
    "error": "Verror.log",
    "loglevel": "warning"
  },
  "inbound": {
    "port": 1080,
    "listen": "0.0.0.0",  // 这行我设置时是没有的,启动v2rayN以后才出现
    "protocol": "socks",
    "settings": {
      "auth": "noauth",
      "udp": true,       // 设置时这个值是false,可能我在客户端勾选了udp转发
      "ip": "127.0.0.1",
      "clients": null
    },
    "streamSettings": null
  },
  "outbound": {
    "tag": "agentout",   //这行我设置时是没有的,启动v2rayN以后才出现
    "protocol": "vmess",
    "settings": {
      "vnext": [              // 这行我设置时是没有的,启动v2rayN以后才出现
        {
          "address": "xxxxxx",
          "port": 8080,
          "users": [
            {
              "id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx"
              "alterId": 0,    //设置时填的是64, 启动v2rayN后变成了0
              "security": "aes-128-gcm"
            }
          ]
        }
      ]
    },
    "streamSettings": {         // 这行和以下5行我设置时是没有的,启动v2rayN以后才出现
      "network": "tcp",          
      "security": "",                  
      "tcpSettings": null,          
      "kcpSettings": null,          
      "wsSettings": null           
    },
    "mux": {
      "enabled": true
    }
  },
  "inboundDetour": null,
  "outboundDetour": [
    {
      "protocol": "freedom",
      "settings": {
        "response": null
      },
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "http"
        }
      },
      "tag": "blockout"
    }
  ],
  "dns": {                            //这行和以下4行我设置时是没有的,启动v2rayN以后才出现
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "strategy": "rules",
    "settings": {
      "domainStrategy": "IPIfNonMatch",
      "rules": [
        {
          "type": "field",
          "port": null,                                          // 这行我设置时是没有的,启动v2rayN以后才出现
          "outboundTag": "direct",                    // 这行我设置时是没有的,启动v2rayN以后才出现
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "domain": null
        }
      ]
    }
  }
}
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

    服务器端错误日志:

    // 在这里附上服务器端日志
    2017/12/01 05:55:24 [Warning]Core: V2Ray started

这还是12月1日的记录,也就是今天根本没有记录。

客户端错误日志:
    // 在这里附上客户端日志
2017/12/04 18:03:54 [Warning]Core: V2Ray started
2017/12/04 18:04:04 [Warning]failed to handler mux client connection > Proxy|VMess|Outbound: failed to find an available destination > Retry: [dial tcp xx.xx.xx.xx:8080: connectex: No connection could be made because the target machine actively refused it.] > Retry: all retry attempts failed
  1. 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。(这里是不是应该为access.log ?)
    // 在这里附上服务器端日志
 空
  1. 其它相关的配置文件(如 Nginx)和相关日志。

服务器IP应该没问题,我配置ss/ssr都可以正常使用。
/etc/init.d/iptables status 命令显示 Firewall modules are not loaded.

@DarienRaymond
Copy link
Contributor

服务器端的端口不匹配或者防火墙没有开放相应端口。

@dancorpse
Copy link
Author

端口是一致的。但是为什么我用ss和ssr都没有进行打开防火墙端口的操作也可以打开网页?是不是v2ray必须依赖这个模块?

@dancorpse
Copy link
Author

据说centos6根本没有防火墙规则,那究竟怎么回事?

@DarienRaymond
Copy link
Contributor

还有确定一下v2ray正常运行。这个错误一般都是端口不通,要么是防火墙,要么是没有被监听。

@dancorpse
Copy link
Author

Service v2ray status 是running

@dancorpse
Copy link
Author

dancorpse commented Dec 5, 2017

v2rayN客户端下方的信息显示2017/12/05 09:21:32 [Debug]App|Proxyman|Inbound: creating tcp worker on 0.0.0.0:1080,现在完全没方向了,是否和vps系统也有关系centos 6?但是我设置ss/ssr的时候什么都没有做,没有开放vps防火墙端口,也没有在本地路由器上作过设置,直接可以使用。

@dancorpse
Copy link
Author

VPS /etc/sysconfig/iptables 这个文件是空白的,也就是没有规则。

@dancorpse
Copy link
Author

tcping 服务器端口,port is open. 还有什么别的错误可能么?

@dancorpse
Copy link
Author

dancorpse commented Dec 6, 2017

好像可以了, 我换了系统centos7,几乎都没怎么去倒腾它,就可以了。是不是v2ray不适合centos6系统?服务器防火墙默认没有启用。

@DarienRaymond
Copy link
Contributor

Kamino closed and cloned this issue to v2ray/discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants