wordfence

securing wordpress is getting more and more important lately.  finding a decent plugin that monitors your posts, codex and versions of software is pretty helpful.  i found http://www.wordfence.com around the time i first got heavily involved with wordpress administration.

so today i got an emailed error from wordfence about one of my posts:

* Post contains a suspected malware URL: Blah blah blah I am not saying what the real post is called.

So let’s log in and see what the software says, it’s right there in the wordpress admin dashboard.

This post contains a suspected malware URL listed on Google’s list of malware sites. The URL is: http://blahblahblahnottellin.blah – More info available a Google Safe Browsing Page.

ok so the post itself is fine, but whomever we are linking to probably got something injected, or at the least has a page on the url that google no likey.

i am going to review the google page, then probably reach out to the third party provider and tell them to clean their crap up.

another cool aspect of wordfence is the live traffic scanning.  if you see a remote user being naughty (probably a bot) you can ban it right from the wordfence area in wordpress.

Advertisements
Tagged , ,

screen as a tool for collaboration

gnu screen, http://www.gnu.org/software/screen/, man i love you.  you do so many things for me as a system administrator.

i’ve been working with an international team lately.  one thing i’ve done to be able to do make sure we can work together easily is using screen as a collaborative tool.

let’s say a member of my team in london wants to show me how to work with a specific utility, i’ve always recommended us logging in as the same user on the machine (we have some shared users and of course root) and then i would spawn a screen session.  once done, i’d ask them to log in and throw the following command:

screen -Rx

the -R flag will resume the youngest screen created and the -x flag will share it with any others currently logged in.

you always want to use some form of revision control to handle changes you are making in a file. but at times doing a direct discussion across the globe with someone else and both looking at the file, making comments on what needs to be changed can be helpful in a critical situation.

Tagged , ,

things i do whenever i log in

as soon as i log into a server i have a habit of running two commands.

dmesg and w.

i like to see if there is anyone else logged in and i want to see if there are any obvious hardware errors that have been dumped into dmesg.

 

 

Tagged ,

sed, grep and updating a static website.

so one of the offices at the company recently moved from one city to another. they are in the process of migrating the public website from an old static page to a new page using wordpress. if the new site was online, changing a footer with the office address wouldn’t be a problem.  well the new shiny office doesn’t come with the new shiny website.  had to do some cli kung-fu to get the address changed.

so i figured since line of the address in html was on a separate line the best thing was to grep for the string, then use sed to replace it, it’s not elegant but it worked.

first thing we do, we back up our crap in case i totally screw it up. then once my backups are done i run the first part of the string:

grep -lr -e ‘123 Old Street Location, Floor 3’ * | xargs sed -i ‘s/123 Old Street Location, Floor 3/555 New Street Location Suite 4/g’

then let’s do the new city and zip

grep -lr -e ‘Cambridge, MA 02139 USA’ * | xargs sed -i ‘s/Cambridge, MA 02139 USA/Boston, MA 02111 USA/g’ 

this got the job done and quickly since the problem was sitting around for a little while and no one seemed to notice.

Tagged , , ,

memory and tape drives

i’ll be moving to a new company soon, a new position doing neat stuff with pretty great people.  in the process of getting ready to move to this new position i’ve had to spend time putting together notes and information for people at my previous employer.

one of my big tasks while i was here was removing a bacula solution which was running on a machine that was quite outdated.  i moved all of my servers backups to a big ol’ dell r510 server with a two drive tape solution.

one of weird hangups is how the dell powervault tl2000 handles linux memory management.  for some reason the tape controller didn’t care for cached memory.   this would basically spit an error into /var/log/messages when trying to mount a tape “sorry no free ram, can’t do it.”

because all we are doing is backups, file cache isn’t really important in memory.   i added a shell script in cron that  makes use of info provided on the drop_caches tunable.  more info on the tunable can be found here:

http://www.linuxinsight.com/proc_sys_vm_drop_caches.html

you can grab the script i am using to drop the caches from github:

https://github.com/jaydestro/files/blob/master/memory_purge.sh

dell was never really ever able to give me an answer why the TLD’s would act this way.  when i told them i was just purging memory from cache they said “if it works, then stick with it.”

Tagged , ,

getting started…

i’ve decided it’s probably a good idea to start documenting my life as far as system administration is concerned.  i’ll document things i do that are “ok” for public consumption.

my purpose is to expand my existing knowledge of system administration and share that progress with the ol’ internet.

thanks, and help me out if you can!

Tagged ,
Advertisements