1、测试拓扑:
2、测试目的:
Web Server:192.168.1.100/24 GW:192.168.1.254
Internet:200.1.1.2/24
映射的地址:200.1.1.3
3、配置和测试:
3.1 基础配置:
Web Server
!
interface Ethernet0/0
ip address 192.168.1.100 255.255.255.0
end
!
ip route 192.168.1.0 255.255.255.0 Ethernet0/0
!
ip http server
ASA
ciscoasa# sho running-config
: Saved
:
ASA Version 8.4(2)
!
hostname ciscoasa
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
!
interface Ethernet0
shutdown
no nameif
no security-level
no ip address
!
interface Ethernet1
nameif dmz
security-level 50
ip address 192.168.1.254 255.255.255.0
!
interface Ethernet2
nameif outside
security-level 0
ip address 200.1.1.1 255.255.255.0
!
interface Ethernet3
shutdown
no nameif
no security-level
no ip address
!
ftp mode passive
object network webserver-external-ip
host 200.1.1.3
object network webserver
host 192.168.1.100
object network inside-subnet
subnet 192.168.1.0 255.255.255.0
access-list outside_acl extended permit tcp any object webserver eq www
access-list outside_acl extended permit ip any any
pager lines 24
mtu dmz 1500
mtu outside 1500
no failover
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-649-103.bin
no asdm history enable
arp timeout 14400
!
object network webserver
nat (dmz,outside) static webserver-external-ip service tcp www www
object network inside-subnet
nat (dmz,outside) dynamic interface
access-group outside_acl in interface outside
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
telnet timeout 5
ssh timeout 5
console timeout 0
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
anyconnect-essentials
!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map type inspect dns preset_dns_map
parameters
message-length maximum client auto
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect ip-options
inspect netbios
inspect rsh
inspect rtsp
inspect skinny
inspect esmtp
inspect sqlnet
inspect sunrpc
inspect tftp
inspect sip
inspect xdmcp
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
call-home
profile CiscoTAC-1
no active
destination address http https://tools.cisco.com/its/service/oddce/services/DDCEService
destination address email callhome@cisco.com
destination transport-method http
subscribe-to-alert-group diagnostic
subscribe-to-alert-group environment
subscribe-to-alert-group inventory periodic monthly
subscribe-to-alert-group configuration periodic monthly
subscribe-to-alert-group telemetry periodic daily
crashinfo save disable
Cryptochecksum:d41d8cd98f00b204e9800998ecf8427e
: end
Internet
!
interface Ethernet0/0
ip address 200.1.1.2 255.255.255.0
end
!
3.2、测试:
Internet#telnet 200.1.1.3 80
Trying 200.1.1.3, 80 … Open
4、问题:如果我们只有一个公网IP地址怎么办?
配置示例:
object network 192.168.111.100-https
host 192.168.111.100
nat (inside,outside) static interface service tcp https https
object network 192.168.111.100-www
host 192.168.111.100
nat (inside,outside) static interface service tcp www www
都映射到outside的接口。
手机扫一扫
移动阅读更方便
你可能感兴趣的文章