Cisco ASA 5510 静态一对一 NAT

Cisco ASA 5510 静态一对一 NAT

我正在尝试在 Cisco ASA 5510 上使用静态 NAT,但只有一个 IP 进入网络。有人能指出我的错误吗?我在 Google/Cisco 上读了很多资料,但没能搞清楚。这是我的配置;

ciscoasa# show running-config
: Saved
:
ASA Version 8.4(5)
!
hostname ciscoasa
names
!
interface Ethernet0/0
 shutdown
 nameif ISP1
 security-level 0
 ip address 50.100.150.200 255.255.255.248
!
interface Ethernet0/1
 nameif ISP2
 security-level 0
 ip address 40.80.120.160 255.255.255.240
!
interface Ethernet0/2
 nameif inside
 security-level 100
 ip address 192.168.10.10 255.255.252.0
!
interface Ethernet0/3
 shutdown
 no nameif
 no security-level
 no ip address
!
interface Management0/0
 nameif management
 security-level 0
 ip address 10.10.10.10 255.255.255.0
 management-only
!
ftp mode passive
clock timezone GMT 0
dns domain-lookup ISP1
dns domain-lookup ISP2
object network ISP1
 subnet 192.168.8.0 255.255.252.0
object network ISP2
 subnet 192.168.8.0 255.255.252.0
object network Server_10.51
 host 192.168.10.51
object network Public_120.161
 host 40.80.120.161
object network Server_10.23
 host 192.168.10.23
object network Public_120.162
 host 40.80.120.162
access-list outside_access_in extended permit tcp any object Server_10.51
access-list outside_access_in extended permit icmp any object Server_10.51 echo
access-list outside_access_in extended permit tcp any object Server_10.23
access-list outside_access_in extended permit icmp any object Server_10.23 echo
no pager
logging enable
logging asdm informational
mtu ISP1 1500
mtu ISP2 1500
mtu inside 1500
mtu management 1500
icmp unreachable rate-limit 1 burst-size 1
icmp permit 192.168.8.0 255.255.252.0 inside
no asdm history enable
arp timeout 14400
no arp permit-nonconnected
!
object network ISP1
 nat (inside,ISP1) dynamic interface
object network ISP2
 nat (inside,ISP2) dynamic interface
object network Server_10.51
 nat (inside,ISP2) static Public_75.35 dns
object network Server_10.23
 nat (inside,ISP2) static Public_75.36 dns
access-group outside_access_in in interface ISP2
route ISP1 0.0.0.0 0.0.0.0 50.100.150.201 1 track 1
route ISP2 0.0.0.0 0.0.0.0 40.80.120.161 254
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
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
http server enable
http 10.10.10.0 255.255.255.0 management
http 192.168.8.0 255.255.252.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
sla monitor 55
 type echo protocol ipIcmpEcho 8.8.8.8 interface ISP1
 num-packets 3
 frequency 10
sla monitor schedule 55 life forever start-time now
!
track 1 rtr 55 reachability
telnet 192.168.8.0 255.255.252.0 inside
telnet timeout 5
ssh 192.168.8.0 255.255.252.0 inside
ssh timeout 5
ssh key-exchange group dh-group1-sha1
console timeout 0
vpn-addr-assign local reuse-delay 30
dhcpd address 10.10.10.11-10.10.10.254 management
dhcpd enable management
!
threat-detection basic-threat
threat-detection statistics access-list
no threat-detection statistics tcp-intercept
webvpn
!
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 rsh
  inspect rtsp
  inspect esmtp
  inspect sqlnet
  inspect skinny
  inspect sunrpc
  inspect xdmcp
  inspect sip
  inspect netbios
  inspect tftp
  inspect ip-options
  inspect icmp
!
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
Cryptochecksum:bbd2c8104910bfa4e9b215125b9cb3f9
: end

答案1

你的动态 NAT(见下文)优先于你的静态 NAT

动态 NAT

object network ISP1
 nat (inside,ISP1) dynamic interface
object network ISP2
 nat (inside,ISP2) dynamic interface

静态 NAT

object network Server_10.51
 nat (inside,ISP2) static Public_75.35 dns
object network Server_10.23
 nat (inside,ISP2) static Public_75.36 dns

NAT 的处理顺序为 或Section 1>> Section 2>> Section 3。建议第 3 部分 自动 NAT 之后用于通用 NAT 策略。更具体的 NAT 应配置为第 1 部分 手动 NAT

其他说明

  • ip address 50.100.150.200 255.255.255.248并且ip address 40.80.120.160 255.255.255.240是坏面具。ASA 不允许使用子网 ID分配为接口地址。其他 Cisco IOS 允许通过使用ip 子网零命令

  • interface Ethernet0/0关闭。流量将无法到达 50.100.150.200/29 网络上的任何主机。

  • interface Ethernet0/2/22网络。我将验证以确保每个内部测试主机的掩码均为“255.255.252.0”,且其有效网关与以下接口地址相匹配:以太网0/2

  • 您的静态 NAT 仅允许转换 DNS 服务。dns出于故障排除目的,我将从静态 NAT 配置中删除。

推荐的故障排除命令

小心使用调试命令。

show xlate detail
show nat detail
debug nat 255 

附加支持文件

ASA 网络地址转换配置故障排除

ASA 8.4+ 上的 NAT 配置

相关内容