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的接口。

最新文章

  1. ubuntu关于引导修复[grub命令行][live linux]
  2. 关于repaint(重绘)和reflow( 回流)
  3. ASP.NET MVC SSO单点登录设计与实现
  4. RMAN的恢复篇
  5. FAQ软件卸载
  6. Tomcat上的项目部署到WebLogic上の注意事项
  7. Qt5 程序发布打包
  8. 关于JS异步加载方案
  9. hadoop笔记之MapReduce的应用案例(利用MapReduce进行排序)
  10. LeetCode: Best Time to Buy and Sell Stock II [122]
  11. Imagine Cup 微软“创新杯”全球学生科技大赛
  12. 《HTML5与CSS3权威指南》读书笔记(上册)—HTML5篇
  13. 【leetocde】 105. Construct Binary Tree from Preorder and Inorder Traversal
  14. JEECG BOOT
  15. 嵌入式linux——S3C2440介绍(二)
  16. 排查 Maxwell can not find database 并且使用 MySQL binlog 解决相关问题
  17. 算法提高 金属采集_树形dp
  18. 洛谷.3809.[模板]后缀排序(后缀数组 倍增) & 学习笔记
  19. 【python40--类和对象:一些相关的BIF】
  20. css 解决fixed 布局下不能滚动的问题

热门文章

  1. 18新生赛 4. Deal
  2. Ubuntu16.04突然断网
  3. [USACO12FEB] 附近的牛 Nearby Cows - 树形dp,容斥
  4. 2020牛客寒假算法基础集训营1 J. 缪斯的影响力 (矩阵快速幂/费马小定理降幂)
  5. docker在windows下和linux下网络底层的一些区别
  6. 【Python】简单计算器
  7. selenium获取短暂出现元素的xpath路径
  8. SpringCloud Netflix Feign
  9. cvtColor(src, src_gray, CV_BGR2GRAY)报错
  10. MVC5+EF6 入门完整教程2 :从前端UI开始