Articles in Networking
NFS I/O Stats with Logging
![NFS I/O Stats with Logging tq9mhhd5xy2q0kto2j1785n6odv[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/tq9mhhd5xy2q0kto2j1785n6odv1-150x150.jpg)
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
![Inventorying NFS Mounts and Mount Options 4ucne6vs8m7hqdl0el9ddqd1sql[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2021/10/4ucne6vs8m7hqdl0el9ddqd1sql1-150x150.jpg)
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
![Generating IP Whitelists sonlxanvz0en50ijq03cedkaz2e[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2021/08/sonlxanvz0en50ijq03cedkaz2e1-150x150.jpg)
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
![Validating HTTPS Cache Peers for Squid sy2zeb1vp2h8itlxfbbylw0jrm0[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2019/12/sy2zeb1vp2h8itlxfbbylw0jrm01-150x150.jpg)
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
![Verifying SNMP Connectivity on Multiple Hosts Photo-2019-10-07-14-39-03_0266[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2019/11/Photo-2019-10-07-14-39-03_02661-150x150.jpg)
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
![Bulk-Adding IPTables Rules b3gk9tc9x14ki5xa4bx8c4v1b66[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2019/11/b3gk9tc9x14ki5xa4bx8c4v1b661-150x150.jpg)
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
![Automatically Block Frequent Visitors gea59uduencunzibzb6i3gxn36m[1]](https://i2.wp.com/www.krazyworks.com/wp-content/uploads/2019/11/gea59uduencunzibzb6i3gxn36m1-150x150.jpg)
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
![Working with iptables Logging gpxvtms6cvea4q504jtbxjfwcd5z-2[1]](https://i1.wp.com/www.krazyworks.com/wp-content/uploads/2019/11/gpxvtms6cvea4q504jtbxjfwcd5z-21-150x150.jpg)
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
![Analyzing Network Performance gly8stqifn615gp3xbc34h64byx-2[1]](https://i0.wp.com/www.krazyworks.com/wp-content/uploads/2019/11/gly8stqifn615gp3xbc34h64byx-21-150x150.jpg)
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