Chinaunix首页 | 论坛 | 博客
  • 博客访问: 847631
  • 博文数量: 275
  • 博客积分: 3904
  • 博客等级: 中校
  • 技术积分: 4605
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:10
文章分类

全部博文(275)

文章存档

2014年(9)

2013年(124)

2012年(142)

分类: 系统运维

2014-04-03 10:22:06

今天在一个客户那边的

asa5510(config)#            

asa5510(config)# show run
: Saved
:
ASA Version 7.0(7)
!
hostname asa5510 主机名
domain-name 1cisco.com.cn 域名
enable password FgQ836L.2fG/AEir encrypted ASDM的登陆密码
names
dns-guard
!
interface Ethernet0/0 外部接口
nameif outside 接口名
security-level 0
ip address X.X.X.X 255.255.255.248 地址
!
interface Ethernet0/1内部接口
nameif inside
security-level 100
ip address 192.168.1.1 255.255.255.0 ip地址,内部电脑的网关
!
interface Ethernet0/2
shutdown
no nameif
no security-level
no ip address
!            
interface Management0/0
nameif management
security-level 100
ip address 1.1.1.1 255.255.255.0
management-only   管理接口 可以关闭 默认192.168.1.1
!
passwd WXjstPgDOxFTLAaA encrypted
ftp mode passive

object-group network Public 定义一个IP组 组名为Public (做ACL的时候可以方便减少ACL条目、这里做的是IP组,其实还可以基于服务来做个组,)
network-object host 192.168.1.2定义组内的IP
network-object host 192.168.1.3
network-object host 192.168.1.4
network-object host 192.168.1.5
network-object host 192.168.1.6
network-object host 192.168.1.7 这些组里的IP在后面将被引用
access-list 102 extended permit icmp any any
access-list 102 extended permit ip any any 定义ACl
access-list 111 extended permit ip host 192.168.1.16 any
access-list 111 extended permit ip object-group Public any 定义ACL 注意这里的源地址引用的是一个我们前面定义的地址组,
access-list 111 extended deny ip any any 这里是拒绝所有,大家应该知道我的ACL的意思了吧 ,拒绝所有人上网。上面允许的除外
pager lines 24
logging asdm informational
mtu outside 1500
mtu inside 1500
mtu management 1500
asdm image disk0:/asdm-507.bin 指定ASDM路径,开启ASDM的命令之一,至于ASDM版本,大家可以DIR的命令来查看到,
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0
nAT转换,吧内部接口的所有IP转换到外部的公网IP,让所有内部IP可以上网,
access-group 102 in interface outside
access-group 111 in interface inside 这2个是引用前面定义的ACL一个外部接口一个内部接口 如果没和我一样的只允许部分IP上网的需求的 可以不要INSIDE的ACL以及ACL 111的条目
route outside 0.0.0.0 0.0.0.0 xx.x.x.x 1外部的默认路由 x.x.x.x为公网的网关
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
timeout mgcp-pat 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
username cisco1 password W0ATeFBkCO3ErmVn encrypted privilege 15(asdm SSH登陆用户名和密码)
aaa authentication ssh console LOCAL (SSH 登陆启用本地认证,就是上面的cisco1)
http server enable(激活ASDM)
http 0.0.0.0 0.0.0.0 outside
http 0.0.0.0 0.0.0.0 inside(在外部和内部借口上启用ASDM)

no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
telnet 0.0.0.0 0.0.0.0 inside启用内部的TELNET
telnet timeout 5
ssh 0.0.0.0 0.0.0.0 outside
ssh 0.0.0.0 0.0.0.0 inside(起用内部和外部接口的SSH)
ssh timeout 30
ssh version 2 SSH版本2
console timeout 0

!
class-map inspection_default
match default-inspection-traffic
!
!
policy-map global_policy
class inspection_default
inspect dns maximum-length 512
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
!
service-policy global_policy global
Cryptochecksum:5ee69c74afd48da59841097fe14670ad
: end

阅读(4189) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~