Articles in Networking
NFS I/O Stats with Logging
The nfsiostat is an excellent tool for analyzing NFS performance. The only major problem with this utility is that it’s designed to be used interactively. It does not have logging or timestamping capabilities. I needed …
Inventorying NFS Mounts and Mount Options
As time goes by, NFS mounts multiply like rabbits. Added by many different people over the years, these entries present a dizzying variety of mount options – most are a copy-paste job that makes little …
Generating IP Whitelists
I have several scripts that scan various log files for signs of suspicious activity and block the offending IPs on my Web servers – pretty standard stuff. The trick, of course, is not to block …
Validating HTTPS Cache Peers for Squid
I have a squid proxy server that uses a long list of authenticated cache peers in a round-robin configuration. The process looks something like this:
Verifying SNMP Connectivity on Multiple Hosts
I needed to check if SNMP was accessible on whatever live servers that existed in a particular subnet. Here’s a quick script to do this.
Bulk-Adding IPTables Rules
I’ve been using my mod of this handy script to block countries with iptables. One issue with the script is that it is adding rules one-by-one using the iptables -A syntax. This is the proper …
Automatically Block Frequent Visitors
I had a few similar scripts floating around this site, but this one is a bit more all-inclusive and better organized. The script will analyze your firewall/whatever access log and block particularly active visitors.
Working with iptables Logging
Most commonly iptables is used to allow, block, or redirect connections. However, it also has a logging feature that can be very useful for network traffic analysis and system security.
Analyzing Network Performance
Much of network performance analysis will be comparative in nature. Thus, seeing the output of multiple commands side by side can be quite useful. Bash has a useful little utility called pr and we’ll make …
Adding and Removing sshd instances on CentOS 7
As a follow-up to my previous post about adding sshd instances on CentOS 5 & 6, here’s a script that does the same on RHEL/CentOS 7.
Adding and Removing sshd instances on CentOS 6
This is a process and a couple of script to allow you to setup an additional sshd service on an alternate port.
Measure DNS Server Performance
This is not an entirely proper way to benchmark a DNS server, but, in a pinch, it should give you some idea of its responsiveness and stability.
Inventory Network Services with Nmap
With the growing number of network-enabled devices in your home, meaningful security becomes elusive. The first step to addressing the situation is knowing what you have. A few examples below use the nmap
utility to scan your local network and detect active devices and services.
Verify Network Port Access
There are several tools you can use to verify access to a remote network port: nc, tcping, telnet. Unfortunately, nc from the netcat package has been replaced by the one from nmap, which lacks the -z option, making …
Detect SSL Certificate Injection
When the SSL Digital Certificate is intercepted and replaced by a device between your browser and the Web site, we call it certificate injection. This method is more commonly used not by hackers, but by …
Extracting Email Addresses from TCP Streams
Here’s a quick example of using tshark to extract email addresses from TCP streams. Let’s say some application on your server is sending emails and you want to find out who is receiving those emails. …
Occupy Subnet
The script below (tested on RHEL 7) will use arp-scan to identify unused IPs on your subnet and configure virtual interfaces attached to your primary NIC to take over every available IP.
Using IPTables to Allow Access to Private Networks
Below is a quick example of how to use iptables to allow port access for all types of private networks. In this case we’re allowing access to ports 10000 and 20000, commonly used by webmin and usermin.
Sun T-Series ILOM and Solaris 11 Network Configuration
Just some quick notes on setting up Oracle Sun T-series server ILOM and network aggregation with LACP. I don’t get to do this very often, so every time it’s a struggle to remember, with much …
Tracking Emails in Postfix Logs
Depending on your Postfix configuration, the same email may cycle through the postfix queue several times, changing it’s queue ID and making it difficult to track. For example, if you have Amavis configured for spam and …
Socket Statistics ss Command
This is a small collection of useful ss (written by Alexey Kuznetsov of the Russian Nuclear Research Institute) syntax examples that go beyond the basics covered by other sources. Here’s one I use often: it shows established connections to …
Fixing NIC Name in Cloned VMWare Linux Machines
A suspected bug with certain versions of VMware ESX causes cloned Linux VMs to obtain a sequentially-number NIC. For example, if the parent VM had eth0, the clone will have eth1, and the clone of …
Latest Comments