X-osadminの自留地
  • 博客主页 HomePage
  • 技术小絮 Tech
  • 作品发布 Works
  • 软件专题 Softs
    • proxmox
    • openwrt
    • chromebook
    • Zerotier
    • 虚拟化
  • 友情链接 Following

xosadmin

BGPlayer / Codes learner / Love Linux
Posts
75
Comments
0

友情链接 – Friendly Links

  • Add your site here…
xosadmin
5 years ago

外网通过Zerotier访问内网其他主机的方法

Zerotier是一个非常卓越的组网软件。它可以以最简单的方式构成一张虚拟网络。目前有很多OpenWrt路由器固件已经附带了该功能。但是大部分路由器不带有此功能。因此,可以通过在内网内搭建跳板机的方式,来解决这一问题。

在本次测试中,跳板机采用带有Zerotier插件的OpenWrt x86系统,基于Proxmox和KVM架构。并举例要访问的目标内网网段为2.2.2.0/24。

  1. 在OpenWrt中配置Zerotier,并使Zerotier能正常获取IP地址。
  2. 在防火墙中,建立一个新的区域(这里举例:zerotier),并使其能转发至wan。
  3. 在接口中,创建一个新的虚拟接口。创建时,请选择名称以zt开头的物理接口。并将本虚拟接口加入之前创建好的zerotier区域。
  4. 在防火墙–自定义规则中,添加以下规则后重启防火墙:

iptables -A FORWARD -d 2.2.2.0/24 -j ACCEPT
iptables -A FORWARD -s 2.2.2.0/24 -j ACCEPT

5. 编辑/etc/sysctl.conf文件,加入以下内容,并执行sysctl -p使其生效。(可选)

net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.eth0.rp_filter = 0

6. 在Zerotier后台加入相应的静态路由。

到这里,一切完成。

Enjoy~

  • Zerotier
  • 技术小絮
等 人表示很赞
3,423
0

📮Comments

No Comment.
xosadmin
xosadmin
5 years ago
推荐 apache提示You don’t have permission to access /* on this server.的解决方法
首先,X-osadmin在这里祝大家520快乐!近日有朋友遇到了这样一个问题:在CentOS 8下安装php-fpm+apache,在浏览器打开时均提示You don’t have permission to access / ...
  • 技术小絮
3,822 0
xosadmin
xosadmin
5 years ago
推荐 Proxmox挂载Windows Samba时报错的解决方法
近日在Proxmox的Web界面上挂载由Windows Server 2008共享的CIFS(Samba共享)时,界面报出以下错误: create storage failed: error with cfs lock ‘fil ...
  • proxmox
  • 技术小絮
5,878 0
xosadmin
xosadmin
5 years ago
推荐 Windows Server 2008安装.net 4.8时提示证书问题的解决方法
近日在给Windows Server 2008 R2安装.net framework 4.8时,提示一个证书错误,无论如何重启或恢复,均无效。错误如下: A certificate chain could not be built to a ...
  • 技术小絮
6,632 0
xosadmin
xosadmin
4 years ago
推荐 CentOS迁移后开机提示lvm not found的解决方法
最近在尝试将Hyper-V虚拟机迁移至proxmox VE。在经过QEMU-IMG转换完后,部分虚拟机出现了无法启动的问题,并提示:/dev/centos/root not found,terminal卡在dracut。这是由于initra ...
  • proxmox
  • 技术小絮
1,231 0
xosadmin
xosadmin
3 years ago
推荐 git提示server certificate verification failed的解决方法
在部分Ubuntu或者Debian系统上,git在clone或者push时可能会报出server certificate verification failed的错误,具体报错如下: server certificate verifica ...
  • 技术小絮
790 0
  • Windows FTP服务器通过PASV模式无法获取目录的解决方法
  • Proxmox日志出现大量lxcfs truncated错误的解决方案
  • Proxmox通过CLI向LXC挂载已有虚拟磁盘的方法
  • LXC上安装Gitlab时sysctl报错的解决方法
  • Proxmox VE通过全盘方式直通硬盘
  • Proxmox为KVM VNC启用剪贴板支持

文章聚合

  • Proxmox日志出现大量lxcfs truncated错误的解决方案
  • Proxmox通过CLI向LXC挂载已有虚拟磁盘的方法
  • Proxmox VE通过全盘方式直通硬盘
  • Proxmox为KVM VNC启用剪贴板支持
  • Proxmox报出RRDC/RRD update error的解决方法
  • 在Debian 12上安装Proxmox VE的方法

Multilangual Translator

Copyright © 2016-2025 X-osadminの自留地. All rights reserved. Designed by nicetheme.
  • 博客主页 HomePage
  • 技术小絮 Tech
  • 作品发布 Works
  • 软件专题 Softs
    • proxmox
    • openwrt
    • chromebook
    • Zerotier
    • 虚拟化
  • 友情链接 Following
Welcome
Forgot password?
Welcome
Forgot password?
Social Login
Login with WeChat QR Code
Unregistered WeChat IDs will be automatically used to create an account.
Scan and Reply with Keywords「登录」Get Verification Code
Social Login
Free registration
Social Login
Reset password
Back to Login