vernon.wenberg.net

a mostly private knowledge repository

Note: These posts are notes for me. These are not guides and you should not use these instructions as step-by-step instructions without knowing what they do.

Latest Posts

Only allow certain IPs to access your Apache2/nginx web server

2024-01-16

Use the following statements in your conf files. IPs are in CIDR format. Replace with your IP ranges as needed. Apache 2.4 <FilesMatch ".*"> Require ip 192.88.134.0/23 Require ip 185.93.228.0/22...

Install certificate for LDAPS on Windows Server

2023-12-11

To use a certificate in Windows for IIS usage, you can select the certificate in IIS bindings. It is a bit different to use a certificate for LDAPS. There are two things to keep in mind: Windows will...

Create a shared SFTP chroot directory for multiple users

2023-11-20

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...

Add Duo Two-Factor auth to SSH in Ubuntu

2023-11-17

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...

Network Policy Server (NPS) Notes

2023-11-15

Audit policy CLI commands to set the success or failure to enable (Enable – enables logging). auditpol /set /subcategory:”Network Policy Server” /success:enable /failure:enable Get the current...

Expand Logical volume in Linux LVM

2023-10-16

LVM makes it easy to resize volumes in Linux. This can be done without unmounting drives or requiring a restart. First determine the free space of the group volume. First determine the partition...

LibreNMS - Notes On Upgrading from Ubuntu 20.04 to 22.04

2023-10-16

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...

Useful Tools

2023-06-26

Link Compilation Awesome Sys-admin - A curated list of amazingly awesome open source sysadmin resources. free-for.dev - A list of SaaS, PaaS and IaaS offerings that have free tiers of interest to...

Allow SSH connections only from certain addresses using hosts.deny/hosts.allow

2023-06-22

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....

Rate limit connections in Linux

2023-06-09

Use the following iptables command to rate limit connections per IP. This is useful for preventing a DDoS attack on DNS servers. However, for DDoS protection for your DNS servers, you should be...

Yarn Repository Expire Key Error

2023-03-15

When using yarn through the apt repo, the key might expire, giving you the following error when updating apt. W: An error occurred during the signature verification. The repository is not updated and...