請問這句Port Forward有沒有問題?



贊助商連結


rainfile
2002-08-18, 10:10 PM
以下是我的rc.local,我想把A(203.80.x.x)電腦的 Web Services Port 80轉送到B Computer(192.168.0.2),但不能成功,希望大家給一點意見給我。
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/usr/local/squid/bin/squid
/usr/local/squid/bin/RunCache &

#NAT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1>/proc/sys/net/ipv4/ip_forward
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -A INPUT -p all -s 192.168.0.0/255.255.255.0 ACCEPT
iptables -A FORWARD -p all -s 192.168.0.0/255.255.255.0 -j ACCEPT
iptables -A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -A PREROUTING -d 203.80.x.x -p all -j DNAT --to
192.168.0.2
iptables -t nat -A PREROUTING -d 203.80.x.x -p tcp --dport 80 -j DNAT
--to 192.168.0.2

當我在網上打入我的A Computer IP(203.80.X.X)IE會出現connection time out無法顯示網頁。