目前架構是
PC3 ----- 小烏龜----switch-----PC1
Internet | 192.168.1.254 (撥接,NAT)
| eth0 ppp0
PC2
192.168.1.250(撥接)
eth0 ppp0
PC1 和 PC2 系統都是 centos
PC1 用 @ip.hinet.net 撥接、然後負責 NAT 和 DHCP
PC2 用 @hinet.net 撥接
現在 PC3 要透過 PC1 的 9999 port 的 IP 連進 PC2 的 port 3306
我在 PC1 設 iptables ,把 port 9999 都導到 PC2 的 port 3306 ,但是一直無法連線
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 9999 -j DNAT
--to-destination 192.168.1.250:3306
請問有那個地方該修改的嗎?
個人思考應該是和 PC2 也有撥接的關係、但不知道該怎麼改
--
PC3 ----- 小烏龜----switch-----PC1
Internet | 192.168.1.254 (撥接,NAT)
| eth0 ppp0
PC2
192.168.1.250(撥接)
eth0 ppp0
PC1 和 PC2 系統都是 centos
PC1 用 @ip.hinet.net 撥接、然後負責 NAT 和 DHCP
PC2 用 @hinet.net 撥接
現在 PC3 要透過 PC1 的 9999 port 的 IP 連進 PC2 的 port 3306
我在 PC1 設 iptables ,把 port 9999 都導到 PC2 的 port 3306 ,但是一直無法連線
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 9999 -j DNAT
--to-destination 192.168.1.250:3306
請問有那個地方該修改的嗎?
個人思考應該是和 PC2 也有撥接的關係、但不知道該怎麼改
--
All Comments