IP : Cisco PIX 500 系列安全设备

PIX 6.2 :有和没有 IPSec 隧道的 NTP 配置示例

2016 年 10 月 24 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 8 月 22 日) | 反馈


目录


简介

本文提供了示例配置,使用网络时间协议(NTP)使PIX防火墙的时钟与网络时间服务器同步。PIX 1直接和网络时间服务器通信。PIX 2通过一个IPSec隧道通过NTP流量到PIX 1,轮流转发数据包到网络时间服务器。

注意: 路由器可能也使用作为Ntp server同步PIX防火墙的时钟。参考请配置Cisco路由器是一Ntp server欲知更多信息。

先决条件

要求

在尝试此配置前,请保证您符合这些要求:

  • 必须建立端到端 IPsec 连接才能开始此 NTP 配置。

  • PIX 版本 6.2 已添加 NTP 支持。PIX防火墙必须运行6.2或以后。

  • PIX防火墙许可必须启动,用于数据加密标准(DES)加密(最低加密级别)。

使用的组件

本文档中的信息根据思科PIX防火墙软件软件版本6.3(3)。

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 要查找本文档所用命令的其他信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用此图所示的网络设置。

/image/gif/paws/45400/pix-ntp.gif

配置

本文档使用此处所示的配置。

PIX1 配置
PIX Version 6.3(3)
interface ethernet0 auto
interface ethernet1 auto
interface ethernet2 auto shutdown
nameif ethernet0 outside security0
nameif ethernet1 inside security100
nameif ethernet2 dmz0 security10
enable password 2KFQnbNIdI.2KYOU encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pix1
domain-name cisco.com
fixup protocol dns maximum-length 512
fixup protocol ftp 21<br>fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol ils 389
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list nonat permit ip 10.0.6.0 255.255.255.0 host 209.165.201.2
access-list ipsec permit ip 10.0.6.0 255.255.255.0 host 209.165.201.2
pager lines 24
mtu outside 1500
mtu inside 1500
mtu dmz0 1500
ip address outside 209.165.201.3 255.255.255.224
ip address inside 10.0.6.1 255.255.255.0
no ip address dmz0
ip audit info action alarm
ip audit attack action alarm
no failover
failover timeout 0:00:00
failover poll 15
no failover ip address outside
no failover ip address inside
no failover ip address dmz0
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list nonat
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
route outside 0.0.0.0 0.0.0.0 10.66.79.161 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+ 
aaa-server RADIUS protocol radius 
aaa-server LOCAL protocol local 
ntp authentication-key 1 md5 ********
ntp trusted-key 1
ntp server 10.0.6.5 key 1 source inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
fragment chain 1
sysopt connection permit-ipsec
crypto ipsec transform-set vpn esp-3des esp-md5-hmac 
crypto map cisco 10 ipsec-isakmp
crypto map cisco 10 match address ipsec
crypto map cisco 10 set peer 209.165.201.2
crypto map cisco 10 set transform-set vpn
crypto map cisco interface outside
isakmp enable outside
isakmp key ******** address 209.165.201.2 netmask 255.255.255.255 
isakmp keepalive 10
isakmp policy 10 authentication pre-share
isakmp policy 10 encryption des
isakmp policy 10 hash md5
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400
telnet timeout 5
ssh timeout 5
console timeout 0
terminal width 80
Cryptochecksum:bf28afe92a93af6170d8de380afeb424
: end

PIX2 配置
PIX Version 6.3(3)
interface ethernet0 auto
interface ethernet1 auto shutdown
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password 2KFQnbNIdI.2KYOU encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pix2
domain-name vpn.cisco.com
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol ils 389
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list ipsec permit ip host 209.165.201.2 10.0.6.0 255.255.255.0
pager lines 24
logging on
logging buffered debugging
mtu outside 1500
mtu inside 1500
ip address outside 209.165.201.2 255.255.255.224
ip address inside 10.1.1.10 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
route outside 0.0.0.0 0.0.0.0 209.165.201.1 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+ 
aaa-server RADIUS protocol radius 
aaa-server RADIUS (inside) host 1.1.1.1 cisco timeout 10
aaa-server LOCAL protocol local 
ntp authentication-key 1 md5 ********
ntp trusted-key 1
ntp server 10.0.6.5 key 1 source outside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set vpn esp-3des esp-md5-hmac 
crypto map cisco 10 ipsec-isakmp
crypto map cisco 10 match address ipsec
crypto map cisco 10 set peer 209.165.201.3
crypto map cisco 10 set transform-set vpn
crypto map cisco interface outside
isakmp enable outside
isakmp key ******** address 209.165.201.3 netmask 255.255.255.255
isakmp identity address
isakmp policy 10 authentication pre-share
isakmp policy 10 encryption des
isakmp policy 10 hash md5
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400
telnet timeout 5
ssh timeout 5
console timeout 0
terminal width 80
Cryptochecksum:26d03e15146cf920b3d7ab61eaf75905
: end
[OK]
pix2(config)#

验证

本部分提供的信息可帮助您确认您的配置是否可正常运行。

命令输出解释程序工具仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。

  • show ntp status - 显示 NTP 时钟信息。

    pix1#show ntp status
    	Clock is synchronized, stratum 9, reference is 10.0.6.5
    	nominal freq is 99.9984 Hz, actual freq is 99.9984 Hz, precision is 2**6
    	reference time is af99ca9d.ab979ef4 (06:47:57.670 UTC Tue May 11 1993)
    	clock offset is -27.3950 msec, root delay is 1.04 msec	
    	root dispersion is 7906.14 msec, peer dispersion is 7878.71 msec
  • show ntp associations [detail] - 显示配置的网络时间服务器关联。

    pix1#show ntp associations detail
    	10.0.6.5 configured, authenticated, our_master, sane, valid, stratum 8
    	ref ID 127.127.7.1, time af99cb13.44a14229 (06:49:55.268 UTC Tue May 11 1993)
    	our mode client, peer mode server, our poll intvl 64, peer poll intvl 64
    	root delay 0.00 msec, root disp 0.03, reach 17, sync dist 2123.413
    	delay 1.07 msec, offset -311.1441 msec, dispersion 2122.85
    	precision 2**18, version 3
    	org time af99cb1d.53083e9b (06:50:05.324 UTC Tue May 11 1993)
    	rcv time af99cb1d.a2d2a9b5 (06:50:05.636 UTC Tue May 11 1993)
    	xmt time af99cb1d.a27b176f (06:50:05.634 UTC Tue May 11 1993)
    	filtdelay =     1.07    1.05    1.04    1.04    0.00    0.00    0.00    0.00
    	filtoffset = -311.14  -30.13  -27.39  -19.99    0.00    0.00    0.00    0.00
    	filterror =     0.02    0.99    1.97    2.94 16000.0 16000.0 16000.0 16000.0

故障排除

本部分提供的信息可用于对配置进行故障排除。

故障排除命令

命令输出解释程序工具仅限注册用户)支持某些 show 命令,使用此工具可以查看对 show 命令输出的分析。

注意: 在发出 debug 命令之前,请参阅有关 Debug 命令的重要信息

  • debug ntp validity - 显示 NTP 对等体时钟正确性。

    以下是密钥不匹配的 debug 输出:

    NTP: packet from 10.0.6.5 failed validity tests 10
     	  Authentication failed
    
  • debug ntp packet - 显示 NTP 数据包信息。

    当没有来自服务器的响应时,在PIX上只能看到NTP xmit 信息包而看不到NTP rcv信息包。

    NTP: xmit packet to 10.0.6.5:
     leap 0, mode 3, version 3, stratum 9, ppoll 64
     rtdel 0077 (1.816), rtdsp 3e290 (3885.010), refid 0a000605 (10.0.6.5)
     ref c3390a82.f50ac415 (12:16:02.957 UTC Thu Oct 16 2003)
     org c3390a82.f70e3cc7 (12:16:02.965 UTC Thu Oct 16 2003)
     rec c3390a82.f50ac415 (12:16:02.957 UTC Thu Oct 16 2003)
     xmt c3390ac2.f6363336 (12:17:06.961 UTC Thu Oct 16 2003)
    NTP: rcv packet from 10.0.6.5 to 209.165.201.2 on ntp0:
     leap 0, mode 4, version 3, stratum 8, ppoll 64
     rtdel 0000 (0.000), rtdsp 0002 (0.031), refid 7f7f0701 (127.127.7.1)
     ref c3390ac0.65629071 (12:17:04.396 UTC Thu Oct 16 2003)
     org c3390ac2.f6363336 (12:17:06.961 UTC Thu Oct 16 2003)
     rec c3390ac2.f8c541ec (12:17:06.971 UTC Thu Oct 16 2003)
     xmt c3390ac2.f8d6f76f (12:17:06.972 UTC Thu Oct 16 2003)
     inp c3390ac3.5d1f1568 (12:17:07.363 UTC Thu Oct 16 2003)

相关信息


Document ID: 45400