You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Server1经Server2:5501转发至Server3:1521的端口转发失效问题排查求助

Server1经Server2:5501转发至Server3:1521的端口转发失效问题排查求助

各位好,我目前碰到了端口转发的问题,想请大家帮忙排查下:

我的环境是三台服务器:

  • Server 1: 192.168.0.1
  • Server 2: 192.168.0.2
  • Server 3: 192.168.0.3

已知Server 2能正常访问Server 3的1521端口,现在我需要实现的转发路径是:Server1 -> Server2:5501 -> Server3:1521

我在Server2上做了以下配置:

  1. 开启IP转发:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    
  2. 尝试了两种iptables规则配置:
    第一种:
    iptables -t nat -A PREROUTING -p tcp --dport 5501 \
    -j DNAT --to-destination 192.168.0.3:1521
    
    第二种:
    iptables -t nat -A PREROUTING --dst 192.168.0.2 -p tcp --dport 5501 \
    -j DNAT --to-destination 192.168.0.3:1521
    

但从Server1上执行telnet 192.168.0.2 5501测试时,始终无法连通。想请教各位,我的配置命令是否有问题?或者有没有什么排查思路可以定位问题?

备注:内容来源于stack exchange,提问作者AlexD

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 07:39:40