centos 6 multiple vlans with one eth device

The scenario I had was 1 eth0 device, and my port trunk’d to allow 9 and 10 vlans. I wanted to assign the full /24 to this box, using only eth0 and the trunk port in CentOS 6. This is what I had to do. in linux NEED eth0 and one VLAN’d CFG: cd /etc/sysconfig/network-scripts/ ...

history command with timestamp linux

I always find it easier when my history has a time stamp, you can coorolate a lot of things, like last, start/stops of services, who done it, etc. export HISTTIMEFORMAT=”%F %T ” This will work for the session, but if you want it saved for every log in add to respective bash_profile: ~/.bash_profile or /root/.bash_profile

Firewall Status: Enabled but Stopped in CSF with cPanel

I kept getting: Firewall Status: Enabled but Stopped in my CSF in cPanel. I am currently running WHM 11.40.1 (build 11) and csf v7.03. I tried just clicking start, no luck it would just flip back a few minutes later. So I ended up dropping to shell and running service csf stop iptables –flush service ...

how to disable RHN in linux – red hat or centos

What I did to disable it was go to: /etc/sysconfig/rhn and delete all of the files in it. If you want to re-enabled it after, you can just copy the files back, so you may want to copy them to a location you want to keep them at.

How to get external ip via linux command line

wget -O - -q icanhazip.com you will get a very easy looking readout example: root@madhost419 [~]# wget -O - -q icanhazip.com 74.122.196.130 root@madhost419 [~]# or via curl: curl http://www.cPanel.net/showip.cgi

removing the limit of 100 rows in squirrel

Using the squirrel app: http://www.squirrelsql.org/ I had issues with only seeing 100 rows in a table. I fixed this by going to File -> New Sessions Properties -> Object Tree -> Contents -> limit rows. The default is 100, but you can uncheck it and you should be good. If not, you can also do ...

Could not open external command file for reading via open(): (13) -> Permission denied in nagios v4.01

I ended up getting this in my nagios.log, the fix was to change the permissions on the rw file! chmod 777 /usr/local/nagios/var/rw/nagios.cmd

Directory index forbidden by Options directive: /var/www/html/

I was receiving this error in my nagios apache log: Directory index forbidden by Options directive: /var/www/html/ to fix this, I just did touch index.html to /var/www/html It creates a file in the directory that is empty. I found this safer then turning on indexes for my nagios install.

internal server error with CSF (Config Server Firewall) in cPanel after upgrade in cPanel

So I was receiving this error after cPanel upgraded: Internal Server Error 500 No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/addon_csf.cgi): subprocess exited with status 2   This did not fix it:   /usr/sbin/csf -x /scripts/perlinstaller --force URI /usr/sbin/csf -e /usr/sbin/csf -u If that doesn’t work this will:   curl -s configserver.com/free/csupdate | perl    

How to move files that are older then x days in linux

I found this useful: sudo find ./* -mtime +2 -exec mv {} /hosting/dropbox/ops/user/client/ \; breakdown… ./* is the current directory, including all files, but you could use full path. mtime +2 is 2 days old mv is the command being executed and after the brackets is the directory the files are moving to