icmplib uses raw packets to create ICMP packets. While this is not an issue in Windows, ping on Linux always runs as root to create those packets. icmplib will throw the following error if it is unable to get permissions to create raw network packets. Use the following command to allow Python to manipulate raw…
Tag: linux
“agent refused operation” when logging in with ssh keys
Copying your SSH keys to a new server is usually accomplished by However, on Fedora 40, I encountered the following error after adding my keys. This appears to just be a permissions issue. To fix this, use the following commands.
Service check / Port check in LibreNMS
LibreNMS offers a way to check for services and/or ports. In this example, we will check for HTTPS/SSL. First we need to enable services. Make sure the value for show_services is “1”. If not, change it to “1”. We then need to install the nagios-plugins. Let’s add a dummy device. In this case, we will…
CrowdStrike: Update to supported kernel to remove RFM status in Ubuntu
To get the full benefits of the falcon-sensor on Ubuntu, you need to use a supported kernel, or your system will be in “RFM”. To remove the RFM status we will need to update to a kernel supported by your version of falcon-sensor. First verify your RFM status. You should see the following in the…
Essential Linux/Mac/WSL Terminal Apps
I usually forget what apps I regularly use on a Linux terminal until I get a command not found error. This will act as my reference to remember to install these apps when using a new terminal. This is a work in progress and apps may be added or removed. Most of these apps are…
Only allow certain IPs to access your Apache2/nginx web server
Use the following statements in your conf files. IPs are in CIDR format. Replace with your IP ranges as needed. Apache 2.4 Apache 2.2 nginx
Create a shared SFTP chroot directory for multiple users
These are instructions to create a shared directory amongst two or more users. This will only allow those users access to SFTP, but not the shell. They will also be “jailed” to the directory of your choosing. These examples were done using Ubuntu 22.04 and assume that you are root or using sudo. You are…
Add Duo Two-Factor auth to SSH in Ubuntu
Duo offers a relatively simple way to add support Duo two-factor auth to SSH sessions in multiple Linux Distributions. Here are my steps for Ubuntu Server. Create /etc/apt/sources.list.d/duosecurity.list with the following contents: Create a user that corresponds to your username in Duo. Add your user to sudo group (Ubuntu) or wheel group (RedHat) Install the…
LibreNMS – Notes On Upgrading from Ubuntu 20.04 to 22.04
These are the steps that need to be done when doing an in-place Ubuntu upgrade on a LibreNMS system using do-release-upgrade. Running daily.sh in /opt/librenms should give you most of the errors you need to fix that we will go through in this guide. Most commands here will assume you are running as root or…
Allow SSH connections only from certain addresses using hosts.deny/hosts.allow
This is the method that can be used to allow SSH connections from certain IP networks. An example use for this is allowing SSH from certain public IP networks, as well as from my Tailscale network. If possible, it is probably better to use iptables/nftables/ufw or the firewall feature of your hosting provider if they…