Linux get server hardware information

Get the model number of a server, tested on HP DL380 and 180’s


[root@cephosd4 ~]# dmidecode | grep "System Information" -A20
System Information
        Manufacturer: HP
        Product Name: ProLiant DL180 Gen9
        Version: Not Specified
        Serial Number: xxxxxxx
        UUID: xxx-3335-5541-xxx-313930303734
        Wake-up Type: Power Switch
        SKU Number: 778453-B21
        Family: ProLiant

OpenBGPD on pfSense

Here is a working config from a multi site MPLS VPN connection managed by AAPT

We terminated the connection in the data center with pfSense and OpenBGPD

Default route for all remote sites is via the data center


AS 64512
fib-update yes
listen on


neighbor {
descr "TPG"
remote-as 2764
announce all  

deny from any
deny to any
allow from
allow to

hpacucli on Linux

Original article here –

Using hpacucli to manage RAID

Create a single disk RAID0 (How i use Ceph on my HP DL180’s)

hpacucli ctrl slot=2 create type=ld drives=1I:1:8 raid=0


Show all logical volumes

[root@management ~]# hpacucli controller slot=0 logicaldrive all show

Smart Array P410i in Slot 0 (Embedded)

array A

logicaldrive 1 (136.4 GB, RAID 1, OK)

array B

logicaldrive 2 (1.4 TB, RAID 5, Recovering, 52% complete)


Script to E-Mail in case of RAID failure

#If something went wrong with the HP smartarray disks this script will send an error email
HPACUCLI=`which hpacucli`

if [ `/usr/sbin/uname26 hpacucli controller slot=2 physicaldrive all show | grep -e 'Fail\|Rebuil\|err\|prob' -i | wc -l` -gt 0 ]
echo failure
msg="RAID Controller Errors"
#echo $msg
#$msg2=`hpacucli controller slot=1 physicaldrive all show`
logger -p syslog.error -t RAID "$msg"
echo "Hostname: " $HOSTNAME >> $HPACUCLI_TMP
/usr/sbin/uname26 $HPACUCLI controller slot=2 physicaldrive all show >> $HPACUCLI_TMP
mail -s "$HOSTNAME [ERROR] - $msg" -r "$MAIL" < $HPACUCLI_TMP
#echo "Everything Good"

Ceph – Generate a new key

When using puppet to rollout Ceph you may want to generate new keys for the admin keys etc


[root@lib-cephxx ~]# ceph-authtool --gen-print-key


Example config for Squid reverse proxy using OWA on Exchange 2100 or 2016




redirect_rewrites_host_header off
cache_mem 32 MB
maximum_object_size_in_memory 128 KB
#logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %h" "%{User-Agent}>h" %Ss:%Sh
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
cache_mgr nomail_address_given
forwarded_for transparent
ssl_unclean_shutdown on

#This line is to fix the 2mb connection limit
client_persistent_connections off

https_port 443 accel cert=/etc/squid/wildcard.crt key=/etc/squid/wildcard.key options=NO_SSLv2,NO_SSLv3,CIPHER_SERVER_PREFERENCE dhparams=/etc/squid/dhparams.pem cipher=ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
#https_port 443 accel cert=/etc/squid/wildcard.crt key=/etc/squid/wildcard.key options=NO_SSLv3:NO_SSLv2

#This line has sslversion=3 this has something to do with the 2mb limit
cache_peer parent 443 0 proxy-only no-query no-digest front-end-https=on originserver login=PASS ssl sslflags=DONT_VERIFY_PEER connection-auth=on name=ExchangeCAS
acl site_OWA dstdomain
cache_peer_access ExchangeCAS allow site_OWA
http_access allow site_OWA
#miss_access allow site_OWA

cache_peer parent 443 0 proxy-only no-query no-digest front-end-https=on originserver login=PASS ssl sslflags=DONT_VERIFY_PEER connection-auth=on name=TSGServer
acl site_TSG dstdomain
cache_peer_access TSGServer allow site_TSG
http_access allow site_TSG



Unban an IP

fail2ban-client set sshd unbanip --iphere--

Show status of jails

[root@l1-adl3 ~]# fail2ban-client status
|- Number of jail: 1
`- Jail list: sshd


Show the Fail2Ban log

cat /var/log/fail2ban.log