Skip to content

自建服务器,使用虚拟IP访问正常,配置点对网无法正常使用 #43

@Montaro2017

Description

@Montaro2017

使用自建服务器。
现有设备N,分配到的虚拟IP是10.26.0.2,局域网IP是192.168.2.10

./vnt-cli -s tcp://xxx.xxx.xxx.xxx:29872 -k xxx -o 0.0.0.0/0

设备A,虚拟IP为10.26.0.3,使用界面版本,配置in-ip,需要访问设备N下的局域网

192.168.2.0/24,10.26.0.2

设备A访问192.168.2.10,出现几种不同现象:

  • ERR_EMPTY_RESPONSE
  • 网页一直加载,但是网页标题已经出来了

设备N已按文档配置IP转发

# 开启ip转发
sudo sysctl -w net.ipv4.ip_forward=1
# 开启nat转发  表示来源10.26.0.0/24的数据通过nat映射后再从vnt-tun以外的其他网卡发出去
sudo iptables -t nat -A POSTROUTING ! -o vnt-tun -s 10.26.0.0/24 -j MASQUERADE

设备N是移动网络,设备A是电信网络

Image

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions