iDRAC8内网访问webserver没有任何问题,但是通过公网访问或者二级代理请求访问出现400访问错误的解决方案。

最重要的前提是你有公网IP,以下的实践都是将路由器作为主网络设备,光猫作为桥接设备(设置为桥接模式,需要拨打运营商电话进行设置)。

服务器:R730XD
iDRAC版本:2.83.83.83

问题原因的诞生

iDRAC提供的webserver很好用,但是在iDRAC 2.80.80.80版本后就不能通过外网IP或者二级代理访问了,只要你访问的地址不是你通过iDRAC配置的ipv4地址,那就不可访问。

  1. 访问https://外网IP/会出现Access Error: 400 -- Bad Request

  2. 访问https://外网IP/login.html会出现该网页无法正常运作

这是由于DSA-2021-041漏洞修复导致的其他问题。
正可谓修复一个问题会引出另一个问题,好在有提供解决方案。

解决方案

解决方案1

设置为0禁用检查,1是启用检查

#Disable host header check
racadm set idrac.webserver.HostHeaderCheck 0

解决方案2

如果你不想关闭HostHeaderCheck,那么可以使用这个解决方案2,添加白名单条目来允许访问。
我自己是试过了,没有问题。

# Add manual entry to allow list
racadm set idrac.webserver.ManualDNSEntry 192.168.20.30
racadm set idrac.webserver.ManualDNSentry 192.168.20.30,idrac.mydomain.com

racadm关于idrac.webserver属性的手册页没有这2个属性(HostHeaderCheck 、ManualDNSEntry)的记载,所以你不用费工夫去看API了。

以上的解决方案都是解决公网IP不能访问iDRAC管理页面的方法,至于端口映射等等配置你还是需要自己配置的。

耗时耗力,半夜难眠,历经1礼拜的资源搜索和实践;我终于找到了解决方案。如果对你有用,麻烦给个赞👍吧。

引用资源

20230129 - 其他问题

  1. 在使用“解决方案1”后,每次断电,重新通电后,idrac的web页面有大概率会导致无法访问,访问报400错误,通过查看HostHeaderCheck的值是已经禁用过的,造成这个问题的原因未知,怀疑是Bug。
    可以在服务器自断电后首次通电后,通过ssh连接到idrac的终端,执行racadm racreset命令后,稍等几分钟软重置完成后,就可以恢复web页面的访问了。

这里指的是idrac的终端,不要搞错了,终端的指示符应该是/admin1->

如果还不行的话,就把“解决方案1”的命令重新执行一遍后,等个几分钟后应该就可以访问了。

对于解决方案2没有试过会不会出现这个情况。


idrac在受管系统启动时进入方式:

,在这个页面可以进行基础的配置,配置好idrac的访问ip和端口后,之后可以通过局域网环境下通过ip和端口可以直接访问了,用户名和密码初始的是用户名:root,密码:calvin,如果不是请参考官方文档或其他资源了。

其他的方式时间太久忘记了。


这是idrac的对默认账号和密码的说明方式

racresetcfg

Details of racresetcfg attribute
Description Deletes your current iDRAC configuration and resets iDRAC to the factory default settings. After reset, the **default
 name and password are root and calvin, respectively, and the IP address is 192.168.0.120.** Only for iDRAC
Enterprise on Blade servers, IP address and the number of the slot the server inhabits in the chassis.
If you run racresetcfg from a network client (for example, a supported web browser, Telnet or SSH, or Remote
RACADM), use the default IP address. The racresetcfg subcommand does not reset the cfgDNSRacName
object.
To run this subcommand, you must have the Configure iDRAC privilege and configure user privilege.

RACADM Subcommand Details
NOTE: Certain firmware processes must be stopped and restarted to complete the reset to defaults.
iDRAC becomes unresponsive for about 30 seconds while this operation completes.
Synopsis • RAC reset operation initiated successfully. It may take several minutes for the RAC to come online again.
posted @ 2023-01-18 16:41  星小梦  阅读(2502)  评论(3编辑  收藏  举报