有没有全端口映射技术

查看 25|回复 4
作者:lzlancom   
vps有公网ip,但是配置低
家里的电脑无公网ip,但是配置高
把公网ip全端口映射到家里(ssh22除外)
求技术,软件,方案

公网, 家里, 端口映射

sasber   
Frp...
lzlancom
OP
  

sasber 发表于 2024-9-19 14:59
Frp...

要全端口,或者退一步要批量端口映射吧
jasonss   
可以试试先打个隧道,然后iptables多端口映射
[ol]iptables -t nat -A PREROUTING -p tcp --dport 20000:22000 -j DNAT --to-destination 1.1.1.1:30000-32000
iptables -t nat -A POSTROUTING -p tcp -d 1.1.1.1 --dport 30000:32000 -j SNAT --to-source 2.2.2.2
20000:22000
iptables -t nat -A PREROUTING -p udp --dport 20000:22000 -j DNAT --to-destination 1.1.1.1:30000-32000
iptables -t nat -A POSTROUTING -p udp -d 1.1.1.1 --dport 30000:32000 -j SNAT --to-source 2.2.2.2
20000:22000[/ol]复制代码
HOH   
   
全端口直接做直通NAT就完事了
您需要登录后才可以回帖 登录 | 立即注册

返回顶部