路由器交换机安全设置的总结
反向访问列表在交换技术中的应用方式
公司需求各个VLAN之间不能互相访问,但一些基本的应用不能受影响。假设有5个部门,就有5个VLAN,分别是管理(63)、办公(48)、业务(49)、财务(50)、其他(51)。
方法一: 只在管理VLAN的接口上配置,其它VLAN接口不用配置。
在入方向放置reflect
ip access-list extended infilter
permit ip any any reflect cciepass
在出方向放置evaluate
ip access-list extended outfilter
evaluate cciepass
deny ip 10.54.48.0 0.0.0.255 any
deny ip 10.54.49.0.0.0.0.255 any
deny ip 10.54.50.0 0.0.0.255 any
deny ip 10.54.51.0 0.0.0.255 any
permit ip any any
应用到管理接口
int vlan 63
ip access-group infilter in
ip access-group outfilter out
方法二:在管理VLAN接口上不放置任何访问列表,而是在其它VLAN接口都放。
以办公VLAN为例:
在出方向放置reflect
ip access-list extended outfilter
permit ip any any reflect cciepass
在入方向放置evaluate
ip access-list extended infilter
deny ip 10.54.48.0 0.0.0.255 10.54.49.0 0.0.0.255
deny ip 10.54.48.0 0.0.0.255 10.54.50.0 0.0.0.255
deny ip 10.54.48.0 0.0.0.255 10.54.51.0 0.0.0.255
deny ip 10.54.48.0 0.0.0.255 10.54.63.0 0.0.0.255
evaluate cciepass
permit ip any any
应用到办公VLAN接口:
int vlan 48
ip access-group infilter in
ip access-group outfilter out
IP欺骗得简单防护。如过滤非公有地址访问内部网络。过滤自己内部网络地址;回环地址(127.0.0.0/8);RFC1918私有地址;DHCP自定义地址(169.254.0.0/16);科学文档作者测试用地址(192.0.2.0/24);不用的组播地址(224.0.0.0/4);SUN公司的古老的测试地址(20.20.20.0/24;204.152.64.0/23);全网络地址(0.0.0.0/8)。
Router(Config)# access-list 100 deny ip 192.168.0.0 0.0.0.255 any log
Router(Config)# access-list 100 deny ip 127.0.0.0 0.255.255.255 any log
Router(Config)# access-list 100 deny ip 192.168.0.0 0.0.255.255 any log
Router(Config)# access-list 100 deny ip 172.16.0.0 0.15.255.255 any log
Router(Config)# access-list 100 deny ip 10.0.0.0 0.255.255.255 any log
Router(Config)# access-list 100 deny ip 169.254.0.0 0.0.255.255 any log
Router(Config)# access-list 100 deny ip 192.0.2.0 0.0.0.255 any log
Router(Config)# access-list 100 deny ip 224.0.0.0 15.255.255.255 any
Router(Config)# access-list 100 deny ip 20.20.20.0 0.0.0.255 any log
Router(Config)# access-list 100 deny ip 204.152.64.0 0.0.2.255 any log
Router(Config)# access-list 100 deny ip 0.0.0.0 0.255.255.255 any log
建议采用访问列表控制流出内部网络的地址必须是属于内部网络的。如:
Router(Config)# no access-list 101
Router(Config)# access-list 101 permit ip 192.168.0.0 0.0.0.255 any
Router(Config)# access-list 101 deny ip any any log
Router(Config)# interface eth 0/1
Router(Config-if)# description “internet Ethernet”
Router(Config-if)# ip address 192.168.0.254 255.255.255.0
Router(Config-if)# ip access-group 101 in
关闭路由器不需要的服务
在边界路由器上关闭不安全和不需要的服务,这里假设路由器有Ethernet0和Ethernet1端口
Router(config)# no cdp run//关闭CDP协议,CDP使用多播地址,能够发现对端路由器的Hostname,硬件设备类型,IOS版本,三层接口地址,
发送CDP多播的地址
Router(config)# no service tcp-small-servers
Router(config)# no service udp-small-servers//关闭TCP和UDP的一些无用的小服务,这些小服务的端口小于19,通常用在以前的UNIX环境中,如chargen,daytime等
Router(config)# no service finger//finger通常用在UNIX中,用来确定谁登陆到设备上:
telnet 192.168.1.254 finger
Router(config)# no ip finger//关闭对于finger查询的应答
Router(config)# no ip identd//关闭用户认证服务,一个设备发送一个请求到Ident接口(TCP 113), 目标会回答一个身份识别,如host名称或者设备名称
Router(config)# no ip source-route//关闭IP源路由,通过源路由,能够在IP包头中指定数据包实际要经过的路径
Router(config)# no ftp-server enable//关闭FTP服务
Router(config)# no ip http server//关闭HTTP路由器登陆服务
Router(config)# no ip http secure-server//关闭HTTPS路由器登陆服务
Router(config)# no snmp-server community public RO
Router(config)# no snmp-server community private RW
Router(config)# no snmp-server enable traps
Router(config)# no snmp-server system-shutdown
Router(config)# no snmp-server trap-auth
Router(config)# no snmp-server//关闭SNMP服务
Router(config)# no ip domain-lookup//关闭DNS域名查找
Router(config)# no ip bootp server//bootp服务通常用在无盘站中,为主机申请IP地址
Router(config)# no service dhcp//关闭DHCP服务
Router(config)# no service pad//pad服务一般用在X.25网络中为远端站点提供可靠连接
Router(config)# no boot network//关闭路由器通过TFTP加载IOS启动
Router(config)# no service config//关闭路由器加载IOS成功后通过TFTP加载配置文件
Router(config)# interface ethernet 0
Router(config -if)# no ip proxy-arp//关闭代理ARP服务
Router(config -if)# no ip directed-broadcast//关闭直连广播,因为直连广播是能够被路由的
Router(config -if)# no ip unreachable
Router(config -if)# no ip redirect
Router(config -if)# no ip mask-reply//关闭三种不可靠的ICMP消息
Router(config -if)# exit
注意:使用show ip interface查看接口启用的服务
Router(config)# interface ethernet 0
Router(config -if)# shutdown//手动关闭没有使用的接口
Router(config -if)# exit
Router(config)# service tcp-keepalives -in
Router(config)# service tcp-keepalives -out
//对活动的tcp连接进行监视,及时关闭已经空闲超时的tcp连接,通常和telnet,ssh一起使用
Router(config)# username admin1 privilege 15 secret geekboy
Router(config)# hostname jwy
Bullmastiff(config)# ip domain-name godupgod.com
Bullmastiff(config)# crypto key generate rsa
Bullmastiff(config)# line vty 0 4
Bullmastiff(config -line)# login local
Bullmastiff(config -line)# transport input ssh
Bullmastiff(config -line)# transport output ssh
//只允许其他设备通过SSH登陆到路由器
风暴控制
当端口接收到大量的广播、单播、多播时,就会发生广播风暴。转发这些包将导致网络速度变慢或超时。借助对端口的广播风暴控制,可以有效地避免硬件顺坏或链路故障而导致网络瘫痪。默认状态下,广播、多播和单播风暴控制被禁用。 配置实例:在快速以太网端口开启风暴控制,当网络广播包、多播包和单播包分别占到带宽10%、30%、50%时,即自动 关闭该端口。当宽带占用降低至9%、25%、45%时,再自动启用该端口,配置如下:
interface fastEthernet0/1
swithcport access vlan 2
no ip addres
storm-control broadcast level 10.00 9.00
strom-control multicast level 30.00 25.00
strom-control unicast level 50.00 45.00
strom-control action shutdown
其他要求风暴控制端口配置基本相同。
show storm-control unicast f0/1
storm-control broadcast level 50 30
当 广播到50%的时候,开始丢弃,并持续丢弃到 30%。30%以下开始正常转发。
如果不配置 30%, 那么 低于50% 就开始转发,高于50%就丢弃。
30% -50% 之间,你可以认为是 到达50%开始丢弃开始,到 低于30% 开始转发 之间的一个 继续丢弃的 “缓冲”区。
1 学习访问控制列表命令的使用
例1 为名称为“主楼13”的交换机进行端口配置
命令如下:
ZL13#>config t(回车) :进入特权模式
ZL13 config#>interface fastEthernet 0/1(回车) :进入交换机1号端口(百兆端口) ZL13 config#> switchport port-security(回车) :安全
ZL13 config#>exit(回车) :退出交换机1号端口
ZL13 config#>inter g 0/2(回车) :进入交换机2号端口(百兆端口)
例2:假定客户划分了Vlan 3和Vlan 5两个虚网,IP地址段分别是192.168.3.0/24和192.168.5.0/24,如下面针对Vlan3配置了名为”test”的ACL,使得其他网段的机器只能通过ICMP访问Vlan3.比如只能Ping通Vlan3的机器,但是无法正常访问.
命令如下:
console(config)#access-list test permit icmp any 192.168.3.0 0.0.0.255
console(config)#access-list test permit icmp 192.168.3.0 0.0.0.255 any
console(config)#interface vlan 3
console(config-if-vlan3)#ip access-group test
例3 上例中,如果仅仅只能允许Vlan5的机器访问Vlan3:
命令如下:
console(config)#access-list test permit ip 192.168.5.0 0.0.0.255 192.168.3.0 0.0 .0.255(仅仅配置这一条规则,Vlan3和Vlan5是不能通信的)
console(config)#access-list test permit ip 192.168.3.0 0.0.0.255 192.168.5.0 0.0 .0.255(加上这一条规则,允许返回的数据包,这样才能实现Vlan3和Vlan5的通信)
例4例2中,
绑定IP地址和MAC地址
Arp 192.168.100.1 01-02-03-04-05-06-07 arpa
2 赵旭老师讲解关于telnet控制交换机的使用 telnet 172.16.251.249(回车) :连接到目标交换机
username:输入用户名(回车)
password:输入密码(回车)
xxxxxxx>enable(回车) :进入特权模式
password: 输入密码(回车) :输入特权模式的密码
xxxxxxx#config(回车) :进入配置模式
xxxxxxx(config)#show interface GigabitEthernet 0/1 :查看1号端口的信息
判断:如果信息中含有“shutdown”, :1号端口是关闭状态
xxxxxxx(config)# interface GigabitEthernet 0/1 :进入1号端口
no shutdown :打开1号端口
switchport port-security ip-address 219.217.251.122 :端口和IP地址绑定 xxxxxxx(config)# exit(回车) :退出端口
xxxxxxx(config)# wr(回车) :使以上配置生效
幼师工作总结是一篇个人总结的范文,由课件之家为您精心整理,如果您觉得幼师工作总结不错的话,请把幼师工作总结加到您的收藏夹里面或告诉…
儿科护师20xx年年终总结范文?儿科护师20xx年年终总结范文?针对网友近期对儿科护师20xx年年终总结范文的文秘范文搜索量增加特…
幼师工作总结是一篇个人总结的范文,由课件之家为您精心整理,如果您觉得幼师工作总结不错的话,请把幼师工作总结加到您的收藏夹里面或告诉…
导读:两年的工作,使我真正地了解了它的含义,我的工作就是从“心”开始的--用诚心赢得客户,用细心服务客户,用爱心关心客户。客户经理…
护师年终工作总结的范文护师年终工作总结范文?护师年终工作总结范文怎么写?了护师年终工作总结范文供新老护士参考:一、加强护士在职教育…
总结上班一个月以来,第一次接触到了现实的投标过程,最终的结果很不理想,其中:思路不清、忽略重点、安排不到位、大意等成为了投标失败的…
一、师资队伍的培训是实施新课程的根本师资队伍的培训,有两个途径:1.在职教师的继续教育。市教育局教研室在高一级开设“高中物理新大纲…
(摘登)这次全国烟草工作会议顺利完成了各项议程,即将结束。工业和信息化部部长苗圩同志亲临会议并作了重要讲话,提出明确要求,使我们进…
同志们:经过全体与会代表的共同努力,全国水利工作会议圆满完成了各项议程,就要结束了。大家高度赞誉此次会议。陈雷部长的重要讲话高屋建…
廖永远20xx年x月x日同志们:这次集团公司安全环保工作会议开得很好,很及时、很成功,开出了士气、开出了信心、开出了方向,会上传达…
时间转瞬即逝,转眼我在xxx工作已经快半年了。在这半年的时间里有辛酸、有快乐、有欢笑、有泪水。。。。。开始的时候我是在二期巡逻,大…