路由器设置中怎样关掉不需要的服务
创始人
2024-06-11 19:50:24
0

目前路由器的应用非常广泛,同时用户对于一些路由设置还不是很了解,于是我研究了一下路由器设置中如何关掉一些不需要的服务,在边界路由器设置上关闭不安全和不需要的服务,这里假设路由器设置有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登陆到路由器

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...
2012年第四季度互联网状况报... [[71653]]  北京时间4月25日消息,据国外媒体报道,全球知名的云平台公司Akamai Te...