vps交流

有没有全端口映射技术


vps有公网ip,但是配置低
家里的电脑无公网ip,但是配置高
把公网ip全端口映射到家里(ssh22除外)
求技术,软件,方案
Frp…

要全端口,或者退一步要批量端口映射吧

可以试试先打个隧道,然后iptables多端口映射

  1. iptables -t nat -A PREROUTING -p tcp –dport 20000:22000 -j DNAT –to-destination 1.1.1.1:30000-32000
  2. iptables -t nat -A POSTROUTING -p tcp -d 1.1.1.1 –dport 30000:32000 -j SNAT –to-source 2.2.2.2
  3. 20000:22000
  4. iptables -t nat -A PREROUTING -p udp –dport 20000:22000 -j DNAT –to-destination 1.1.1.1:30000-32000
  5. iptables -t nat -A POSTROUTING -p udp -d 1.1.1.1 –dport 30000:32000 -j SNAT –to-source 2.2.2.2
  6. 20000:22000

复制代码

本帖最后由 HOH 于 2024-9-19 15:03 编辑

全端口直接做直通NAT就完事了

赞(0)
版权声明:本贴采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
帖子名称:《有没有全端口映射技术》
帖子链接:https://bbs.toot.su/196673.html