Here is a snippet of code which will allow you to find all non-Red Hat-supplied packages: rpm -qa –qf ‘%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH} %{VENDOR}\n’ | grep -v ‘Red Hat, Inc\.’ | sort
Who’s connecting to Apache?
Here are a few more one liners that I use quite often to locate large number of apache connections, large numbers of site connections, the busiest site on the server and busiest script on the server. large number of apache connections netstat -plan | grep :80 | awk ‘{print $5}’ | sed ‘s/:.*$//’ | sort…
Pick an IP address out of any file
Here is a small one liner which will pull a list of IP addresses from a file, sort them, select only unique ip’s and then list them from greatest to least. perl -ne ‘while (/([0-9]+\.){3}[0-9]+/g) {print “$&\n”};’ /var/log/exim_mainlog |uniq -c |sort -nr |head -100 You can also modify this to include an output file by…
Auto Block connections via IP tables
Auto block IP’s with high connection counts via iptables; via lovepig.org netstat -npa –inet | grep :80 | sed ‘s/:/ /g’ | awk ‘{print $6}’ | sort | uniq -c | sort -n | while read line; do one=`echo $line | awk ‘{print $1}’`; two=`echo $line | awk ‘{print $2}’`; if [ $one -gt 100…
Implementing new software on your server
Today we will be looking at implementing new software on a production server. So, lets get right to the heart of the matter. The 5 basic processes you will need to follow in getting the new software operating properly and as expected in an existing production environment will include; Strategic Planning/Design – Identifying Needs/Goals Modeling…
CPU usage 58950531.5
This will come in handy in case you ever come across this issue. I am seeing a strange occurrence in whm ‘Main >> System Health >> Show Current CPU Usage’ and in the base OS via the command line. (I know whm pulls cpu info from the OS via script) When I run a ‘ps…
Random password generator
Quick one liner for you this new year… Generate a random 8 character or greater password containing a-z, A-Z and 0-9: egrep -ioam1 ‘[a-z0-9]{8}’ /dev/urandom to create longer passwords, replace the numeric value inside of the { } to whatever you would like. egrep -ioam1 ‘[a-z0-9]{9}’ /dev/urandom UTohcE?Xb egrep -ioam1 ‘[a-z0-9]{10}’ /dev/urandom 1222oh2xEX egrep -ioam1…
PART I: BETTER THAN NOTHING SECURITY
Shamlessly grep’d from the http://www.hackerfactor.com/blog/ There be good stuff here… I’ve started attending a social group of bloggers. It’s part of my mandated community outreach ordered by she-who-must-be-obeyed. (“You need to get out of the office more than once a week!”) The group is primarily a bunch of people who are looking to use their…
PART II: BETTER THAN NOTHING SECURITY
Shamlessly grep’d from the http://www.hackerfactor.com/blog/ There be good stuff here… I’m not an electrician. While I am pretty confident that I can change a light bulb or plug something into an outlet, adding a new electrical outlet or installing a new light into the ceiling of my office is beyond my skill set. Much of…
PART III: BETTER THAN NOTHING SECURITY
Shamlessly grep’d from the http://www.hackerfactor.com/blog/ There be good stuff here… Security is a measurement of risk. Nothing is ever secure, but things can be made secure enough. Most of the time, online network attacks are not personal. The attacker does not want “your site” as much as they want “a” site and yours just happened…
-
Recent Posts
-
Archives
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- October 2020
- September 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- August 2019
- June 2019
- March 2019
- February 2019
- January 2019
- November 2018
- August 2018
- July 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- October 2017
- June 2017
- December 2016
- October 2016
- September 2016
- August 2016
- June 2016
- May 2016
- March 2016
- February 2016
- September 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- March 2009
-
Meta