Search Results

Ping an entire network / netblock

You can use fping to ping a netblock to see which hosts are alive: fping -g 192.168.0.0/24 You could also put ping into a loop, but the output is less than useful: for i in {1..254}; do ping -c1 192.168.1.$i; done nmap is also a handy solution and can provide much more host information if […]

Moving from SysV to Systemd

Goodbye initd, systemd is here!  Systemd brings a lot of benefits such as parallel startups and enhanced troubleshooting but sure does takes some getting used to when you have been working in a completely different way for your entire Linux life!  Systemd is now shipping with CentOS7 and most of the other major distros, so […]

Example IPTables rules for a webserver

Just a quick and basic example IPTables ruleset to secure a web/mail server: # Allow outgoing traffic and disallow any passthroughs iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD DROP # Allow traffic already established to continue iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT

Android Apps for a System Administrator

With phones getting smarter and smarter, its now possible to monitor servers and perform basic administration tasks from your android handset. Here are a few tools I find useful. Connectbot is a great SSH client for the Android. It is fully functional, supporting SSH keys and copy/paste etc.   For Windows RDP connections, I found […]

Identifying apache process usage

When apache is running with php as an apache module rather than as a CGI, all processes will run as the apache user.  This makes it a little tricky on a busy multi-site box to identify which sites are using resources and keeping sessions open.  This little command will identify the working directory that the […]

IIS – The network location cannot be reached

I had a strange error in IIS6 today when adding a secondary IP.  The site wouldn’t start and gave the error “The network location cannot be reached”.  The IP was correct, pingable and the IIS host headers were all fine. I had to install the Windows 2003 support tools to fix this.  They can be […]

Linux reset root password

A Linux servers root password can be reset in a few simple steps via single-user mode. To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by performing the following: 1. At the boot loader menu, use the arrow keys to highlight the installation […]

Identifying Rogue Processes in IIS

Bring up a command prompt and execute: iisapp.vbs This gives you a mapping of process id to application pool.  Next bring up the task manager and identify the process that you are interested in.  If process ids are not currently shown, go to the view menu, select Choose Columns and tick PID. You should now […]