Troubleshooting Disk Space Usage

A couple years ago, my coworker wrote a great post on finding disk space issues in Linux and how to resolve them. Helped me out this weekend when a critical server was having issues, so wanted to post it here: http://www.randomlyexpressed.com/diagnosing-linux-disk-usage/ For future reference (after reading the post above) Show filesystem usage: ~$ df -h Show all files/directories consuming space: ~$ du -kx / | sort -nr | more Show directories in current location: ...

October 16, 2017 · 1 min · Daniel Kuchenski

SSH with Duo MFA and Active Directory

Duo has thorough documentation for adding MFA to your SSH sessions, but there are a couple additional steps needed to also integrate with Active Directory. This post will go through the installation for both Duo and Active Directory for Ubuntu 16.04. For other Linux distros, the Duo documentation linked above has you covered. \ System components: Ubuntu 16.04 server Duo MFA account Duo Unix package Centify Express for Active Directory integration \ Duo Installation: Install OpenSSL development headers and libraries: ...

August 30, 2017 · 3 min · Daniel Kuchenski

Duo Security - HA Radius Servers

If you are using Duo Security MFA (highly recommended), you may want high-availability for your Duo Radius servers. Duo doesn’t currently have a “supported” solution for this, but keepalived worked great after a quick call to support. This is also assuming you have followed Duo’s instructions to install their radius server (found here) First, install keepalived (basic instructions for Ubuntu 14.04: https://raymii.org/s/tutorials/Keepalived-Simple-IP-failover-on-Ubuntu.html) Radius server #1 config: vrrp_instance VIP_1 { state MASTER interface eth0 virtual_router_id 100 priority 101 preempt_delay 30 advert_int 1 authentication { auth_type PASS auth_pass password } virtual_ipaddress { 10.0.0.1 dev eth0 } } Radius server #2 config: ...

November 19, 2015 · 2 min · Daniel Kuchenski

Linux Packet Capture

If you need to debug traffic going to a linux server or appliance, you can use tcpdump to generate a pcap file you can analyze in wireshark. For example, ssh into the server, and use the following command: tcpdump -s0 port 80 and host 192.168.1.10 -wDebugTraffic.pcap This will capture all traffic coming into port 80 from host 192.168.1.10 and saved as file DebugTraffic.pcap You can then use an ftp program (like WinSCP) to grab the file and analyze it in wireshark. ...

September 17, 2014 · 1 min · Daniel Kuchenski