月度归档:2017年05月

refused smux peer: oid >SNMPv2-SMI::enterprises.674.10892.1

In my ESX server after installing Dell Open Manager we are getting this message on the syslog:
“refused smux peer: oid >SNMPv2-SMI::enterprises.674.10892.1”

The solution:

The openmanage install should have appeneded this line to
# vi /etc/snmp/snmd.conf

#(comment) Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX
(ADD THE LINE)
smuxpeer .1.3.6.1.4.1.674.10892.1

Then be sure to restart the snmpd service.
# /etc/init.d/snmpd stop
# /etc/init.d/snmpd start

nagios 结合Dell-OMSA监控设备硬件

 

Nagiso 客户端要求必须在dell服务器上安装 OMSA(Openmanage Server Administrator)

 
Nagios客户端安装OMSA (可参考http://linux.dell.com/repo/hardware/OMSA_7.4.0/)

1、增加dell的yum库 ( 可以访问 http://linux.dell.com/repo/hardware 查看最新版本 )
 wget -q -O - http://linux.dell.com/repo/hardware/OMSA_7.4.0/bootstrap.cgi | bash

2、安装srvadmin
 yum install srvadmin-all -y

3、启动srvadmin
/opt/dell/srvadmin/sbin/srvadmin-services.sh start

Nagios 服务端配置
 
1、dell官方OMSA监控脚本下载(下载至Nagios 服务器 /usr/local/nagios/libexec下,并赋nagios执行权限)
 wget  http://folk.uio.no/trondham/software/check_openmanage-3.7.11/check_openmanage
 
 另,由于check_openmanage为perl脚本,故需perl解释器 需安装 perl-Net-SNMP
yum install perl-Net-SNMP  
 
2、以下是手动执行脚本获取硬件状态
 
#电压
./check_openmanage -H 192.168.1.100  --only voltage
VOLTAGE OK - 20 voltage probes checked

 
#cpu
./check_openmanage -H 192.168.1.100  --only cpu
PROCESSORS OK - 1 processors checked

 
#风扇转速
./check_openmanage -H 192.168.1.100  --only fans
FANS OK - 12 fan probes checked

#存储
./check_openmanage -H 192.168.1.100  --only storage
STORAGE OK - 3 physical drives, 1 logical drives

 
#内存
./check_openmanage -H 192.168.1.100  --only memory
MEMORY OK - 2 memory modules, 32768 MB total memory

 
#电池
./check_openmanage -H 192.168.1.100  --only batteries
BATTERIES OK - 1 batteries checked

 
check_openmanage 脚本更多详细用法请参考:
http://folk.uio.no/trondham/software/check_openmanage.html
如果以上无报错时,便可配置到Nagios 中了,配置方法网上较多,在这里就不多说了


#卸载openManage Server Administrator
yum erase $(rpm -qa | grep srvadmin)

继续阅读

haproxy: restrict specific URLs to specific IP addresses

This snippet shows you how to use haproxy to restrict certain URLs to certain IP addresses. For example, to make sure your admin interface can only be accessed from your company IP address.

This snippet was tested on haproxy 1.5.

This snippet is tested on a Digital Ocean VPS. If you like this snippet and want to support me, plus get free credit @ DO, use this link to order a Digital Ocean VPS: https://www.digitalocean.com/?refcode=7435ae6b8212

This example restricts access to the /admin/ and /helpdesk URL’s. It only allows access from the IP addresses 20.30.40.50 and 20.30.40.40. Any other IP addresses will get the standard haproxy 403 forbidden error. 继续阅读

Windows 事件命令行实用程序

Windows 事件命令行实用程序。

用于检索有关事件日志和发布者的信息,
安装和卸载事件清单,运行查询以及导出、存档和清除日志。

用法:

你可以使用短(如 ep /uni)或长(如
enum-publishers /unicode)形式的命令和选项名称。
命令、选项和选项值不区分大小写。

变量均使用大写形式。

wevtutil COMMAND [ARGUMENT [ARGUMENT] …] [/OPTION:VALUE [/OPTION:VALUE] …]

继续阅读

OpenVAS开源风险评估系统部署方案

OpenVAS,即开放式漏洞评估系统,是一个用于评估目标漏洞的杰出框架。功能十分强大,最重要的是,它是“开源”的——就是免费的意思啦~

它与著名的Nessus“本是同根生”,在Nessus商业化之后仍然坚持开源,号称“当前最好用的开源漏洞扫描工具”。最新版的Kali Linux(kali 3.0)不再自带OpenVAS了,所以我们要自己部署OpenVAS漏洞检测系统。其核心部件是一个服务器,包括一套网络漏洞测试程序,可以检测远程系统和应用程序中的安全问题。

但是它的最常用用途是检测目标网络或主机的安全性。它的评估能力来源于数万个漏洞测试程序,这些程序都是以插件的形式存在。openvas是基于C/S(客户端/服务器),B/S(浏览器/服务器)架构进行工作,用户通过浏览器或者专用客户端程序来下达扫描任务,服务器端负责授权,执行扫描操作并提供扫描结果。 继续阅读