问题描述
- iptables 端口转发设置询问
-
现在有两台机器,A,B。向A的local host 即127.0.0.1 的7111端口写数据,想要转发给B的7105端口,请问iptables该如何设置。
假设B的ip是192.168.128.111我这么设了一下,不行,请问哪里错了么?另外B的端口是7105的已经开放。
iptables -t nat -A OUTPUT -p tcp -d 127.0.0.1 --dport 7111 -j DNAT --to 192.168.128.130:7105
解决方案
时间: 2024-09-17 03:39:49