|
近来买了一台思科2600的路由器,准备用它来共享组下面的机器上网。
我这里有一个公网IP和一个公网网关,(网关211.82.220.129 ,公网IP211.82.220.130),下面的机器全部准备用192.168.xx.xx的IP地址,然后网关设成192.168.0.1
配好后,现在能共享上网了,但是现在有个问题,就是端口映射,现在因为我建了WEB服务器,用211.82.220.130的80映射到内部WEB服务器的80端口,现在的问题是外部可以用公网访问WEB服务器,反而内部的机器不能公网IP访问WEB服务器
interface fastethernet0/0
ip address 192.168.0.1 255.255.255.0
duplex auto
speed auto
ip nat inside !
interface fastethernet0/1
ip address 211.82.220.129 255.255.255.252
duplex auto
speed auto
ip nat outside !
access-list 1 permit 192.168.0.0 0.0.0.255
ip nat pool everyone 211.82.220.130 211.82.220.130 netmask 255.255.255.0
ip nat inside source list 1 pool everyone overload
ip nat inside source static tcp 192.168.0.11 80 202.99.160.130 80
ip nat inside source static tcp 192.168.0.12 21 202.99.160.130 21
ip nat inside source static tcp 192.168.0.13 25 202.99.160.130 25
ip nat inside source static tcp 192.168.0.13 110 202.99.160.130 110
ip route 0.0.0.0 0.0.0.0 202.99.160.129
[ 本帖最后由 runnie 于 2007-1-8 11:58 编辑 ] |
|