Proxmox Syslog Errors

So I run proxmox 2.1 (pve-manager/2.1/f9b0f63a). I monitor the servers with Dell’s OpenManage 6.5 and Nagios. I started noticing the following in my syslog (/var/log/syslog)

Jun 26 07:35:21 pveserver1 snmpd[2015]: error on subcontainer ‘ia_addr’ insert (-1)
Jun 26 07:35:21 pveserver1 snmpd[2015]: error on subcontainer ‘ia_addr’ insert (-1)
Jun 26 07:35:51 pveserver1 snmpd[2015]: error on subcontainer ‘ia_addr’ insert (-1)
Jun 26 07:35:51 pveserver1 snmpd[2015]: error on subcontainer ‘ia_addr’ insert (-1)

Quick check online points me to SNMP issues – apparently there is a “bug” that was fixed, but is still technically present due to the default settings of snmpd.

Login as root
nano /etc/default/snmpd
Change the line with SNMPDOPTS to
SNMPDOPTS='-LS6d -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'
And the line with TRAPDOPTS to
TRAPDOPTS='-LS6d -p /var/run/snmptrapd.pid'
Save and Exit

Then restart SNMPD
/etc/init.d/snmpd restart

Watch the log file and see if you receive any more snmpd messages
watch tail -45 /var/log/syslog

Proxmox Ubuntu Debian Force Reboot

I had a cluster of proxmox servers (debian) that refused to reboot. I had just run some updates as part of the monthly maintenance schedule and issued the “reboot” command. I have molly-guard installed, so I had to type the name of the server as well, but they were just sitting there.

Checked the /var/log/messages for any ideas – system preparing for reboot.

The server continued to function as it had before the reboot command – I could use apache, ssh, webmin, etc all fine. As the servers are located at a not-close datacenter AND I have KVM control from any VPN connection, I decided to try to find a way to force it down. Unfortunately our DC does not allow us to control the smart PDUs installed in each rack as they retain the right to remotely monitor our power consumption.

After a short search on my favorite g search engine site, I come across this:
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

As soon as you hit enter on the second command the server will drop and start to reboot.

Security Onion

After reading some more sans security documents I was pointed toward Security Onion as my go-to for IDS/IPS. I had been using snorby TKL by smooth-sec (Bailey.st), but it wasn’t doing a great job and the documentation was lacking. Security onion is more of a resource hog but offers quite a few awesome tools. Here is my basic setup to get Security Onion working properly:

Download ISO, burn, Install on a server (Dell PE1850, 2x 2.8GHz Xeon, 16GB RAM, Mirror 300GB SCSI)

Added Root User – I still dislike all this “sudo this” and “sudo that”
sudo passwd root

Update Operating system
apt-get update
apt-get upgrade

Update Onion
sudo -i "curl -L http://sourceforge.net/projects/security-onion/files/security-onion-upgrade.sh > ~/security-onion-upgrade.sh && bash ~/security-onion-upgrade.sh"

Turn off sensor for Eth1 (assuming Eth0 is mirror port and Eth1 is LAN)
nsm_sensor_ps-stop --sensor-name=YOURSERVERNAME-eth1
nano /etc/nsm/sensortab
Comment out the Interface to disable

Reboot
reboot

Remove SIDs/Block Addresses (*OLD*)
Block SIDs will stop snort from even reporting the issue – by default ALL rules are enabled
nano /etc/pulledpork/disablesid.conf

1:1411-1:1419,1:OTHERRULES,1:ETC

/usr/local/bin/pulledpork_update.sh
nsm_sensor_ps-stop
nsm_sensor_ps-start

Remove SIDs/Block Addresses (*NEW*)
Block SIDs will stop snort from even reporting the issue – by default ALL rules are enabled
nano /etc/nsm/pulledpork/disablesid.conf

1:1411-1:1419,1:OTHERRULES,1:ETC

/usr/bin/rule-update
nsm_sensor_ps-stop
nsm_sensor_ps-start

Blocking IPs will stop snort from worrying about certain hosts – by default ALL hosts are worried
nano /etc/nsm/YOURSERVERNAME-eth1/bpf.conf

Add the following template:

#Nothing from src host to dst port
!(src host xxx.xxx.xxx.xxx && dst port 161) &&
#Nothing from src host to dst host and dst port
!(src host xxx.xxx.xxx.xxx && dst host xxx.xxx.xxx.xxx && dst port 80) &&
#Nothing to or from:
!(host xxx.xxx.xxx.xxx) &&
#Last entry has no final &&
!(host xxx.xxx.xxx.xxx)

nsm_sensor_ps-restart

List AD User Information CSV

I needed to list all users and their creation dates to verify that they were in the correct groups.

Script here

You need to edit the two spots:
objConnection.Open “DOMAINCONTROLLER”
“SELECT Name, profilePath, homeDrive, distinguishedName,userAccountControl FROM ‘LDAP://dc=DOMAIN,dc=LOCAL’ WHERE objectCategory=’user'”