How to create site-to-site connection using IPsec

Use the native IPsec stack to connect multiple networks over the internet. ...

How to perform hostname canonicalization

Perform hostname canonicalization to simplify your configuration and ease work with multiple servers. ...

How to match network inside SSH client configuration

Match specific network inside the SSH client configuration file using Python helper script. ...

How to define multiple SSH configurations for the same host

Define multiple configurations for the same host using the SSH client configuration file. ...

How to determine if hostname belongs to specific network

Use Python script to determine if the hostname belongs to a specific network. ...

How to install SmokePing

Keep track of network latency using SmokePing on Debian Buster. ...

How to fix SmokePing SSH probe on Debian Buster

SmokePing 2.7.3 needs an update to use the SSH probe on Debian Buster. ...

How to determine available authentication methods

Determine available authentication methods on the specified OpenSSH server. ...

How to unmount stale NFS share

Unmount not accessible NFS share that still has open files. ...

How to create VLAN interface using the ip utility

I have already described how to create VLAN interface, but things have changed over time, so I decided to update the know-how. ...

How to mount NFS share using systemd

This is an extension to an older blog post on how to mount WebDAV share using systemd as this proved to be a very reliable method that is easy to mark as a dependency for other services. ...

How to update system time using systemd

Update the system time using systemd as a NTP client. ...

How to remotely execute shell function

Sometimes it is very convenient to define shell function and execute it remotely. ...

How to instantly add known_hosts entries for host and its IP address

Use simple shell function to instantly create known_hosts entries for specified host, including its IP address and remove outdated public host keys. ...

How to merge multiple known_hosts entries into single row

Global known_hosts file located in /etc/ssh/ssh_known_hosts and user managed ~/.ssh/known_hosts contains known host public keys. Due to its nature these files can contain multiple entries using the same key. It is not a problem, but merging entries using the same key is the first step that is necessary to inspect it visually and to verify host entries. ...

How to disconnect idle SSH clients

Disconnect idle SSH clients using built-in client alive mechanism. ...

How to mount WebDAV share using systemd

You can check my earlier blog post on how to mount WebDAV share using command-line or fstab (file systems table), but you are not limited to these two options as you can use systemd to take care of the whole process and automount WebDAV resource on demand. ...

How to execute CGI scripts using fcgiwrap

I am an enthusiast of the uWSGI project. You are still not limited to it as you can use fcgiwrap, a very lightweight and straightforward FastCGI wrapper for CGI scripts that do not require additional configuration. ...

How to keep track of network latency

Keep track of network latency using SmokePing, uWSGI application server, and Nginx HTTP server. SmokePing supports many configurable probes, alerting, and live charts accessible through a web browser. It was created by Tobi Oetiker, which is known for RRDtool an Open Source data logging and graphing system for time series data. ...

How to mount WebDAV share

Nextcloud is a handy self hosted web-based application that can be used to store files, contacts and calendars. It provides the desktop and mobile client. In addition, it supports Web Distributed Authoring and Versioning protocol, so lets mount a WebDAV share. ...

How to display real destination URL

I am using curl to verify redirects and display real destination URL, and you should try it too. ...

How to display HTTP response code

Use curl utility to verify the HTTP response code for the given URL. ...

How to display network connections using lsof and GNU awk

Two years ago, I described a simple way to display established TCP connections using ss command. Today I will use lsof and gawk to pretty print network connections. ...

How to terminate SSH connection

Currently, I am working over an unstable network connection, so my SSH session is constantly disconnected. It is very uncomfortable situation as dropped SSH connection freeze the whole terminal. ...

How to reliably use Serial port within the local network

The easiest way to reliably use Serial port within the local network is to use RS-232/422/485 NPort Device Server produced by Moxa company. I will shortly describe how to install NPort 5110 (1-port RS-232 serial device server) on Debian Wheezy. ...

uGet download manager for Linux desktop

A couple of days on the road made me realize that I need a simple desktop utility that will download files when I sleep. ...

How to change port forwardings during the SSH connection

Last year I wrote a short article about how to set up SSH port forwarding but I forgot to mention that you can quickly terminate existing port forwardings and create new ones during the SSH connection. ...

Brief note on the MySQL Master-Slave replication

What to do when you want to analyze data contained in database without overloading the server? The answer is simple as you can use MySQL Master-Slave replication to offload this task. I will describe it briefly here. ...

Ubiquiti and management VLAN

Yesterday I was playing with Ubiquiti devices and noticed that there is now an option to set management VLAN directly using simple configuration mode. ...

How to change the MAC address of an Ethernet interface

Change the MAC address of an Ethernet interface and make this change permanent. I will briefly explain how to do this using standard commands and one particularly useful tool MAC Changer. ...

Debian – How to transparently bridge Ethernet interfaces

Yesterday, I wrote a short note about VLAN interfaces. Today, I want to write a short entry on how to bridge Ethernet interfaces to keep things complete as I need to mention about creating ACCESS port to tag packets on desired interface. ...

How to create VLAN interface

VLAN (virtual local area network) is very useful concept as you can easily separate device management from users by using appropriate network devices and configuration. I will describe here in a form of a short note how to create VLAN interface using Debian system. ...

Simple shell script to backup MySQL databases

Simple shell script to backup MySQL databases. ...

Debian – How to read DHCP packets

I am playing with DHCP option 82 so I need to read DHCP packets. The easiest way to do this is to use dhcpdump by Edwin Groothuis because of very simple usage and friendly output. ...

Debian – How to replicate data over network using GlusterFS

Recently I needed to replicate data between two Linux servers so I could mitigate potential hardware failure. To achieve this goal I used GlusterFS – an Open Source distributed file system. In this example I will use Debian Wheezy as I want to try more recent version of GlusterFS. ...

How to set up SSH port forwarding

SSH port forwarding is a nice feature that allows to create encrypted tunnels over unsecured network. It is easy and straightforward to remember and use in daily work so I will describe it here with couple of examples. ...

How to send notifications from Android device to desktop

Recently I was playing with Growl notifications and I thought it would be cool idea to see on desktop notifications sent from my phone. ...

Cacti and Mikrotik – How to graph signal strength without hassle

Signal strength on Mikrotik devices can be monitored by Cacti using SNMP protocol. It is straightforward if you have just couple of those devices but you can be easily overwhelmed by dozens of data templates because wireless card’s MAC address is part of the OID. ...

Ubiquiti AirOS 5.5 – How to set management VLAN

Important notice – Jump directly to more recent Ubiquiti and management VLAN blog post. This post is now somewhat obsolete as you don’t need to perform steps described here because there is an option to set management VLAN using simple configuration mode. ...

How to quickly download or upload directory tree over FTP

The fastest way to download or upload directory tree over FTP using just plain console is to execute lftp command. ...

How to check established TCP connections

Display established TCP connections inside the terminal. ...

How to release WAN IP address on WAG120N router using wget

My ISP provider provides dynamically assigned IP address using DHCP. This solution has couple of drawbacks but it comes handy if I need to change IP address to overcome time limit restrictions on streaming services… ...

Ubiquiti NanoBridge M5 – management VLAN

Using firmware version v5.3.3 there is no way to set management VLAN using a browser, but it can be easily set using SSH in a couple of steps as described below. ...

Keep your finger on the pulse with rsyslog and LogAnalyzer

It’s easy to miss something when you need to monitor dozen of logs on different servers and some other devices. Fortunately, there is a simple solution as you can use rsyslog with PostgreSQL or MySQL support to store all local and remote events on your network and then visualize results using LogAnalyzer. ...

Graphical network simulator GNS3

If you need to test router configuration, prepare a small lab, or just learn something new then download and use GNS3. ...

Scripting SPS switches

Managing SPS switches could be real fun if you use expect to automate such tasks. ...

Small proxy for enhanced security, privacy and ads filtering

I prefer to use a small netbook over a desktop pc for light web browsing at home. It’s very comfortable but I need something to filter out advertisements. ...

How to perform HTTP compression test

Perform HTTP compression test using curl utility. ...