收起左侧

fnOS下多网卡同网段部署下端口访问异常

2
回复
86
查看
[ 复制链接 ]

3

主题

3

回帖

0

牛值

江湖小虾

2025-8-5 18:11:14 显示全部楼层 阅读模式

设备环境:(物理机/虚拟机、局域网/公网/反代/域名/P2P、系统/APP版本号、若为移动端/TV请提供手机/电视型号跟系统版本)

BUG现象:fnOS下多网卡同网段,部署时端口访问异常

  • 系统 fnOS 0.9.18
  • 服务器配置了 ​3 个本地 IP 地址​,分别为:
  • 10.0.1.0(绑定于 eno1
  • 10.0.1.1(绑定于 enp6s0
  • 10.0.1.2(绑定于 enp5s0-ovs
  • 三个 IP 均处于同一个子网(10.0.0.0/23);
  • 所有 IP 从外部均可成功 ping 通;
  • fnOS 访问端口:
    • HTTP: 5666
    • HTTPS: 5667
  • 当从客户端直接访问 https://10.0.1.0:5667 时,连接正常;
  • 但访问 https://10.0.1.1:5667https://10.0.1.2:5667 时,连接建立但卡在 TLS 握手阶段(Client Hello 发出后无响应);
  • 该问题在 HTTP (5666) 上同样存在:10.0.1.0 正常,其它 IP 无响应或连接超时;
  • 所有访问均使用 IP 直连,无使用域名或 DNS;(使用域名或Nginx反向代理时问题同样存在)
  • 测试使用 curl 手动指定目标 IP,可复现问题。

出现频率:必现

联系方式:粉丝群548-Galac

日志文件:9345a5318edb4a2c8eca7a8bebdf6cf52cd9b02e

收藏
送赞
分享

3

主题

3

回帖

0

牛值

江湖小虾

2025-8-6 18:30:22 楼主 显示全部楼层

补充一下路由表信息

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    0      0        0 eno1
0.0.0.0         10.0.0.1        0.0.0.0         UG    100    0        0 enp6s0
0.0.0.0         10.0.0.1        0.0.0.0         UG    100    0        0 enp5s0-ovs
10.0.0.0        0.0.0.0         255.255.254.0   U     0      0        0 eno1
10.0.0.0        0.0.0.0         255.255.254.0   U     100    0        0 enp6s0
10.0.0.0        0.0.0.0         255.255.254.0   U     100    0        0 enp5s0-ovs
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-b208efe2d0b0
172.19.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-4b042abccdb6
172.22.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-438bcf24bf5d

使用curl直接测试的结果 (10.0.1.0 正常访问)

galac@Galac-MacMini ~ % curl -vk --resolve 10.0.1.0:5666:10.0.1.0 http://10.0.1.0:5666/

* Added 10.0.1.0:5666:10.0.1.0 to DNS cache
* Hostname 10.0.1.0 was found in DNS cache
* Trying 10.0.1.0:5666...
* Connected to 10.0.1.0 (10.0.1.0) port 5666

> GET / HTTP/1.1
> Host: 10.0.1.0:5666
> User-Agent: curl/8.7.1
> Accept: */*

* Request completely sent off
  < HTTP/1.1 200 OK
  < Server: nginx
  < Date: Wed, 06 Aug 2025 10:28:03 GMT
  < Content-Type: text/html
  < Content-Length: 2930
  < Last-Modified: Tue, 05 Aug 2025 07:11:08 GMT
  < Connection: keep-alive
  < Vary: Accept-Encoding
  < ETag: "6891ae8c-b72"
  < Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0
  < Pragma: no-cache
  < Expires: 0
  < Accept-Ranges: bytes
  <

<!DOCTYPE html>

<html class="light" lang="zh-CN">
  <head>
    <script type="module" crossorigin src="/assets/polyfills-CloYm7Dj.js"></script>

```
<meta charset="UTF-8" />
<!-- <meta name="viewport" content="width=device-width, initial-scale=0.5 minimum-scale=0.5" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
  html,
  body {
    background: linear-gradient(110deg, #4a5568 0.26%, #3a424f 97.78%);
  }
  .incompatible-box {
    display: flex;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
  }
  .incompatible-box h1 {
    margin: 0;
    font-size: 32px;
    line-height: 44px;
    font-weight: 600;
    color: #202327;
    margin-bottom: 20px;
  }
  .incompatible-box .item1 {
    margin-right: 60px;
  }
  .incompatible-box .logo {
    position: absolute;
    display: flex;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
  }
  .incompatible-box .logo div {
    font-size: 20px;
    line-height: 32px;
    font-weight: 600;
    color: #202327;
    margin-left: 8px;
  }
  .incompatible-box p {
    margin: 0;
    font-size: 18px;
    line-height: 24px;
    color: #4a5568;
    margin-bottom: 60px;
  }
  .incompatible-box span {
    display: inline-block;
    margin-top: 14px;
  }
</style>
<title>飞牛 fnOS</title>
<script type="module" crossorigin src="/assets/index-BGAEwkuO.js"></script>
<link rel="modulepreload" crossorigin href="/assets/codemirror-D-aNaB2m.js">
<link rel="modulepreload" crossorigin href="/assets/lottie-react-BfmfuY3x.js">
<link rel="modulepreload" crossorigin href="/assets/rc-select-Bf5TP5wU.js">
<link rel="modulepreload" crossorigin href="/assets/lodash-C933sey-.js">
<link rel="stylesheet" crossorigin href="/assets/index-RFJXEmU1.css">
```

</head>

<body>
    <div id="root"></div>
    <script>
      function isIE() {
        var myNav = navigator.userAgent.toLowerCase();
        return myNav.indexOf('msie') != -1 || myNav.indexOf('trident') != -1 ? true : false;
      }
      if (isIE()) {
        document.querySelector('#root').innerHTML =
          '<div class="incompatible-box"><h1>当前浏览器不兼容飞牛</h1><p>我们建议您使用以下浏览器的最新版获取更好的体验</p><div><img src="static/img/chrome.png" class="item1" alt="" width="auto" height="100" /><img src="static/img/edge.png" alt="" width="auto" height="100" /></div><div><span class="item1">Google Chrome</span><span>Microsoft Edge</span></div><div class="logo"><img src="static/img/trim-logo.png" width="32" height="32" /><div>飞牛</div></div></div>';
      }
    </script>
  </body>
</html>
* Connection #0 to host 10.0.1.0 left intact

使用curl直接测试的结果 (10.0.1.1 or 10.0.1.2 无法正常访问)

galac@Galac-MacMini ~ % curl -vk --resolve 10.0.1.1:5666:10.0.1.1 http://10.0.1.1:5666/
* Added 10.0.1.1:5666:10.0.1.1 to DNS cache
* Hostname 10.0.1.1 was found in DNS cache
*   Trying 10.0.1.1:5666...
* Connected to 10.0.1.1 (10.0.1.1) port 5666
> GET / HTTP/1.1
> Host: 10.0.1.1:5666
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off

* Recv failure: Operation timed out
* Closing connection
  curl: (56) Recv failure: Operation timed out~~~

55

主题

9129

回帖

0

牛值

管理员

2025-8-8 18:05:08 显示全部楼层
已收到反馈 我转给负责的同事看看
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则