SNRS Day 2-1 (CBAC&Auth-Proxy)

随笔3天前发布 别叫我猪
10 0 0

cbac基于内容的访问控制

authentication proxy认证代理,对穿越路由器的流量做认证审计授权.

intrusion prevention system(ips)

cbac

对数据包监控动态放行某些流量,要结合访问列表,对穿越路由器的tcp,udp进行一个监控.从而形成一个状态化的表项,基于表项动态的建立访问列表,当超时后访问列表也会删除掉,cbac可以对dos攻击起到作用.

authentication proxy

对于穿越路由器的流量做一个认证,当做里边访问外面做authentication proxy主要为了限制内部用户出去上网,http,https,ftp,和telnet认证,提供动态,共享用户认证和授权使用tacacs+和radius协议.从外边到里边主要是为了限制访问公共服务器,让特定的用户.

ips

ios ips做深度检查,匹配它的特征库,从而执行actions,alarm(告警),drop,reset.能识别700多种攻击,可以升级.

acl

对源目地址端口号做过滤,他是永久的,它不能对动态协商端口号动态打开端口号.

cbac如何工作

内部有一个client要访问外面的服务器,中间是一个路由器,当路由器配置好cbac后,外部访问内部是不允许的,但是内部访问外部是允许的,必须配一个监控的流量,对什么样的流量做监控,监控是为了动态的产生一个列表.来放行返回流量的.当cbac发现这个流量以后就会维护一个状态化的表项,当返回的时候会动态建立一个访问列表,来允许返回的流量.

cbac会监控所定义的流量,对tcp监控只对简单标准的tcp做监控,单一信道的,比如telnet,如果只是监控tcp在某些情况下ftp还是不能正常工作的,没办法动态打开一些端口号的,如果想动态的打开一些高层协议的,需要监控相应的协议,只有监控了才能动态产生列表,允许返回的列表.

cbac支持的协议

tcp(single channel单信道)

udp(single channel)

rpc

ftp

tfrp

unix r-commands (such as rlogin,rexec,and rsh)

smtp

http(java blocking)

icmp

java

sql *net

rtsp (such as reainetworks)

h.323(such as netmeeting,proshare,cuseeme)语音

other multimedia视频

microsoft netshow

streamworks

vdolive

sip

cbac支持告警和审计

cbac生成一个实时的告警和审计

cbac在一定程度能抵御dos攻击可以把这些告警发送到syslog服务器或者本地的buffer,基于单个协议监控.比如tcp作全部监控做告警和审计.

cbac配置1.选择接口那些是内部那些是外部,

2.配置访问列表

3.配置告警和审计

4.配置全局的timeouts值和阀值

5.定义pam,端口应用程序对应

6.定义inspection监控那些流量

7.应用这个rules和acl到相应的接口

8.测试

实验:

SNRS Day 2-1 (CBAC&Auth-Proxy)

r1:

line vty 0 4

no login

r2line vty 0 4

no login

gateway:

ip inspect audit-trail(打开审计功能)

no ip inspect alert-off(打开告警,默认是打开的)

logging on(打开日志)

logging 61.1.14.2

ip inspect name cbac tcp

ip inspect name cbac udp

ip inspect name cbac ftp

ip inspect name cbac http

cbac是工作在acl之后的,要监控的流量一定要先用列表放行.外部接口deny外面进来所有流量.

ip access-list extended aclin

deny ip any any

int e0/0.2

ip addcess-group aclin in(在外部接口调用)

int e0/0.2

ip inspect cbac out(应用到那些接口都可以,从里边到外面外部接口是out,对初始化包监控)

或应用到内部接口

int e0/0.1

ip inspect cbac in

show ip inspect sessions

show ip inspect all

ip inspect max-incomplete high 1000(总的半开连接数,当超过1000就开始删除老的半开连接)

ip inspect max-incomplete low 500(当低于500的时候,停止删除旧的半开连接)

ip inspect one-minute high 1000(一分钟之内的半开连接数)

ip inspect one-minute low 500

ip inspect tcp max-incomplete host 100(基于单个主机的半天连接数同一目的地址超过100删除所有的半开连接,并且在1分钟之内不允许其他任何主机对这个主机发起半开连接,如果block-time为0当主机一分钟半天连接数超过多少删除老的半开连接数) block-time 1

tcp synwait-time is 30 sec(tcp三次握手必须在30秒内完成,如果没有完成发送reset清除)

tcp finwait-time is 5 sec(tcp断开连接的时间必须在5秒钟完成,如果没有完成发送reset)

tcp idle-time is 3600 sec(tcp的空闲时间3600秒,超过断开tcp连接)

udp idle-time is 30 sec(udp出去返回的udp必须在30秒内返回)

dns-timeout is 5 sec(dns解析请求时间5秒)

port-to-application mapping(端口到应用程序的mapping)

cbac能识别应用协议,默认情况下它只能对标准端口进行识别.

show ip port-map(查看默认应用程序到端口的mapping)

ip port-map ftp port 2121(添加ftp新的端口号)

ip port-map http port 8080(添加http新的端口号)

show ip port-map ftp

show ip port-map http

基于主机和网络的pam

ip port-map ftp port 80 list 80(基于单个主机更改标准的端口,全部更改是不能更改的)

access-list 80 permit 61.1.14.254

对java过滤

ip inspect name cbac http java-list 1

access-list 1 permit 61.1.1.0 0.0.0.255(除过这个网段其他网络的java过滤)

对url过滤

ip inspect name cbac http java-list 1 urlfilter(对url过滤需要定义urlfilter服务器)

ip urlfilter server vendor websense 61.1.14.100

ip inspect name cbac vicmp(监控icmp)

实验三个接口cbac:

SNRS Day 2-1 (CBAC&Auth-Proxy)

gateway:

ip access-list ex dmz

deny ip any any

int f0/0.3

ip access-group dmz in

dmz_r3:

line vty 0 4

no login

gateway:

no ip access-list extended aclin

ip access-list ex aclin

permit tcp any host 218.18.34.3 eq telnet

deny ip any any

ip inspect name out tcp

int e0/0.3

ip inspect out out

show commands

show ip inspect name inspection-name

show ip inspect config

show ip inspect interfaces

show ip inspect session [detail]

show ip inspect all

debug commands

debug ip inspect function-trace

debug ip inspect object-creation

debug ip inspect events

debug ip inspect timers

router(config)#no ip inspect(全部清空cbac)

authentication proxy(认证代理)

认证代理

http,https,ftp,和telnet认证

提供了动态基于用户认证和授权通过tacacs+和radius协议.

一旦认证成功,所有类型的应用都可以授权.

可以工作在接口inbound和outbound.

对于穿越路由器的流量做认证.如果有流量要穿越先提示用户名和密码,输入之后才能过去,对于外面到里面的流量,inbound的某些服务器并不是公共的谁都可以访问,必须通过用户名和密码才能够访问,限制内部client出去上网,也可以做authentication proxy,

authentication proxy配置

如果是对inbound的流量做authenticaiton proxy,添加列表到outside接口用于block进入的流量,如果是对outbound的流量做认证代理,添加列表放到inside,限制内部出去的流量,除了aaa服务器,对于inbound认证代理需要做authentication proxy的rule主要是拦截内部http,https,ftp,telnet对于来自outside的流量做认证.对于outbound proxy authentication 认证代理拦截内部http,https,ftp,telnet对inside的流量做认证.

auth-proxy需要在acs服务器interface configuration里面new services新建协议.然后再group setupauth-proxy的custom attributes里面proxyacl#1=permit tcp any any priv-lvl=15授权.

authentication proxy是工作在列表之前的.authentication proxy并不用放行认证流量.authentication proxy是需要aaa所以路由器到aaa的流量必须放行.授权可以在用户下做也可以在group下做.

user authorization profiles

proxyacl1#permit tcp any any eq 443(https)

proxyacl2#permit icmp any host 172.30.0.50

proxyacl3#permit tcp any any eq ftp

proxyacl4#permit tcp any any eq smtp

proxyacl5#permit tcp any any eq telnet

priv-lvl=15

实验:

SNRS Day 2-1 (CBAC&Auth-Proxy)

r2_out:

ip http server

ip http authentication local

username cisco privilege 15 password cisco

r4_gateway:

aaa new-model

aaa authentication login FOR_CON none

line con 0

login authenticaiton FOR_CON

tacacs-server host 170.1.1.241 key cisco

test aaa group tcacs+ test1 cisco new-code

aaa authentication login default group tacacs+(authentication proxy必须使用default)

aaa authorization auth-proxy default group tacacs+(因为auth-proxy并不像exec会自动应用到线下,所以不用起保护)

line vty 0 4

login authentication FOR_CON

ip access-list extended aclin

permit tcp host 170.1.1.241 eq 49 host 170.1.1.4(放行tacacs+协议)

deny ip any any

int e0/0.1

ip access-group aclin in

ip http server(在网关上配置http server是为了让client弹出认证对话框)

ip http authentication aaa(http认证到aaa)

access-list 1 deny any(不允许让其他用户通过http访问网关)

ip http access-class 1

认证成功不活动踢下线默认时间60秒

认证成功不活动绝对时间默认没有限制

router(config)#ip auth-proxy inactvity-timer 120

ip auth-proxy auth-proxy-banner http &(&为结束)

welcome http….&

ip auth-proxy auth-proxy-banner telnet &

welcome telnet….&

定义authentication proxy rules

哪一种协议来触发

ip auth-proxy name auth http(rules后面可以跟列表不跟列表表示所有)

应用rules到接口

int e0/0.1

ip auth-proxy auth(没有方向)

show commands

show ip auth-proxy cache

show ip auth-proxy configuration

show ip auth-proxy statistics

show ip auth-proxy watch list

debug commands

debug ip auth-proxy ftp

debug ip auth-proxy function-trace

debug ip auth-proxy http

debug ip auth-proxy object-creation

debug ip auth-proxy object-deletion

debug ip auth-proxy tcp

debug ip auth-proxy telnet

debug ip auth-proxy timer

show ip auth-proxy cache(认证缓存)

clear ip auth-proxy cache *(清楚缓存)ip auth-proxy name auth telnet(当做telnet的auth-proxy等于ip)

ip auth-proxy name auth ftp

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...