【正文】
:Router(Config) config tRouter(Config) no accesslist 22Router(Config) accesslist 22 permit Router(Config) accesslist deny anyRouter(Config) username test privilege 10 ****! 設(shè)置SSH的超時間隔和嘗試登錄次數(shù)Router(Config) ip ssh timeout 90Router(Config) ip ssh anthenticationretries 2Router(Config) line vty 0 4Router(Configline) accessclass 22 inRouter(Configline) transport input sshRouter(Configline) login localRouter(Configline) exit!啟用SSH服務(wù),生成RSA密鑰對。);全網(wǎng)絡(luò)地址()。5 啟用訪問列表過濾一些垃圾和惡意路由信息,控制網(wǎng)絡(luò)的垃圾信息流。4 啟用passiveinterface命令可以禁用一些不需要接收和轉(zhuǎn)發(fā)路由信息的端口。只有RIPV2支持,RIP1不支持。/PP2 啟用OSPF路由協(xié)議的認證。在接入路由器上實施時,對于通過單鏈路接入網(wǎng)絡(luò)的用戶,建議采用strict方式;對于通過多條鏈路接入到網(wǎng)絡(luò)的用戶,可以采用ACL方式和loose方式。/PP三、路由器路由協(xié)議安全配置1 建議啟用IP Unicast ReversePath Verification。如果不需要遠程訪問則禁止它。不要采用enable password設(shè)置密碼。3 如果不使用AUX端口,則禁止這個端口。即使需要遠程訪問路由器,建議使用訪問控制列表和高強度的密碼控制。Router(Config) no ip domainlookup如果需要則需要配置:Router(Config) hostname RouterRouter(Config) ip nameserver 13 明確禁止不使用的端口。Router(Config) no ip classless10 禁止ICMP協(xié)議的IP Unreachables, Redirects, Mask Replies。Router(Config) no ip bootp server6 禁止IP Source Routing。Router(Config) no service tcpsmallserversRouter(Config) no service udpsamllservers3 禁止Finger服務(wù)。如:Router(Config)no cdp run Router(Configif) no cdp enable2 禁止其他的TCP、UDP Small服務(wù)。5 禁止BOOTp服務(wù)。Router(Config) no ip directedbroadcast9 禁止IP Classless。如:Router(Config) no snmpserver munity public RoRouter(Config) no snmpserver munity admin RW12 如果沒必要則禁止WINS和DNS服務(wù)。1 建議不要遠程訪問路由器。如:Router(Config)Accesslist 1 permit Router(Config)line con 0Router(Configline)Transport input noneRouter(Configline)Login localRouter(Configline)Exectimeoute 5 0Router(Configline)accessclass 1 inRouter(Configline)end同時給CON口設(shè)置高強度的密碼。如:Router(Config)username test privilege 10 xxxxRoute