ITIT MattersBrandyce.net

Latest posts

Page 2 of 9

Pete Lombardo

The Unprecedented Importance of Revisiting IT Precedents

Every IT leader would agree that a few of the top goals of any IT department are to provide reliable, secure, and sufficient services to meet the needs of the company that they support. Most IT leaders would also agree that yesterday’s solution is for yesterday’s needs. If today’s needs are different, then yesterday’s solutions are likely insufficient. This is clear to most people. The blind spot for some leaders is recognizing that solutions continuously evolve even if your needs remain static. Today’s unchanged solution to your unchanged needs might seem sufficient, but it might be hurting your company if it goes unchecked. Whether you have worked with the company for 2 years or 20 years, it is important to revisit the precedents for solutions that have been set by you or others on a periodic basis. Each year, I add to my IT action plan to review at least one past large-scale solution with the same basic goals to achieve: better service, and better value. Two years ago, I chose to...

Read More
Pete Lombardo

Creating a GlusterFS Cluster for VMs

The best GlusterFS layout that I have found to work with VMs is a distributed replicated cluster with shards enabled. I use laptops with 2 drives in each one. Let’s say we have 4 laptops with 2 drives on each one, we would do something like what I have listed below. First, let’s create a partition on each disk. Use fdisk /dev/sda and fdisk /dev/sdb to create a partition. Now, each disk needs to be formatted as XFS. We format with the command. Now we can use blkid to list the UUID of sda1 and sdb1 so that we can add it to fstab. My fstab looks something like this (your UUIDs will be different. The allocsize is set to pre-allocate files 64MB at a time to limit fragmentation and improve performance. The noatime is to prevent the access time attribute being set every time the file is touched – this is to improve performance as well. The nofail is to prevent the system from not booting in the event of a disk failure. Now I did something funky with my fstab because I wanted to mount my...

Read More
Pete Lombardo

I pity the fool…

Recently, there seems to be an inordinate amount of bad luck surrounding my family. My wife passed out in February and crashed her car with the girls in it – thankfully everyone was ok – but it could have been tragic. As a result of that medical event, my wife can no longer drive for at least a year, perhaps longer. As you can imagine, this puts a huge hardship on the entire family. To make things more complicated, she continues to have episodes of passing out every once in a while, which makes it prudent for her not to carry the kids up or down stairs anymore. Back to the driving – not only can she not drive, but I have to take her for many doctor appointments while the doctors try to figure out what is wrong, and I also have had to re-arrange my work arrangements so that I can spend more time working from home so that I can drive everyone places. I am working longer hours to make up the time, doing more chores at home, and pretty much burning the candle at both ends. Where am I...

Read More
Pete Lombardo

Create a UEFI bootable ISO on Debian

First thing’s first… let’s get a quick overview of what’s need, what goes where, and what to expect. In order to make an ISO bootable, you need an .img file. Many tutorials call this efiboot.img. It’s basically a FAT formatted file that contains a specific folder structure and a specially named executable that UEFI will run. The folder structure should have just one file in it located in /efi/boot/bootx64.efi. The bootx64.efi file is the boot code, so it can be any boot loader that generates it. I like Grub, so that’s what my instructions below do. Now you may wonder – if you use Grub as the bootx64.efi, then where the heck does it get grub.cfg from? It’s pretty plain and simple – it’s in /boot/grub/grub.cfg just as it would be in a regular filesystem. Except, /boot/grub/grub.cfg lives outside the .img file — it lives along-side it, really. Ok, now that that’s out of the way, let’s get started. You need some packages first. Now let’s create a rescue image, which will do the heavy...

Read More
Pete Lombardo

Arch on Chromebook

Apps… Touchpad support: /usr/share/X11/xorg.conf.d/70-synaptics.conf xterm / rxvt customizations /.Xdefaults /etc/sudoers.d/xorg Uncomment the line in /etc/sudoers to look like this: Add user myuser (change to the name of your user) to wheel. Create a file /usr/bin/startx-custom Make it executable. For a high resolution screen like on the Samsung Chromebook Plus, you may want to scale Chromium. To do this, add the following. /.config/chromium-flags.conf If DNS is not working right, adjust /etc/nsswitch.conf to look like this:

Pete Lombardo

Workaround for Nano Issue on Chromebook via SSH

I noticed that on my Chromebook, using nano over SSH causes the screen to blink out of control. The workaround is really simple, though it’s not permanent. First, login to your SSH endpoint. Next, type the following: Now you can open nano without any issues.

Pete Lombardo

Fail-To-Ban (Lite) – EdgeRouter

Here’s how to create a fail-to-ban type of functionality on an EdgeRouter completely using BASH, without installing any 3rd party packages. We are going to create a single script and add a scheduled job to run it. That’s all there is to it. Step 1 Run the following Now we need to turn off auto indent before copying and pasting the script below. Type the following: Now paste the following script into the file: Now let’s make the script executable: And lastly, we need to add a job to run this periodically and also disable hostname lookups in SSH to make the script’s IP validation work properly and remove a possible DoS vector. Done! Now your EdgeRouter should be protected against brute force login attacks.

Pete Lombardo

How to replace a brick in GlusterFS

Scenario 1: Your data drive fails in your machine and you really don’t want to go through the process of reconfiguring a new system just to create and join a new brick. Scenario 2: You proactively replace your hard drive and you keep the OS in tact and just want to use the new drive. The solution to either scenario is quite simple. Let’s stop cron just in case we have any watchdog processes running. First thing we need to do is tell GlusterFS that we want to take the brick offline. We do that with this command. Then we can unmount the old volume and swap out a new disk. As long as our config remains the same, we will later use the reset-brick command to get all of the data back from the redundant copy. Now, you need to create a partition and then format the new drive with the following. Let’s assume that your new drive/partition is /dev/sdb1 and that it’s an SSD so that you want to use f2fs. Now, you need to update /etc/fstab so that it automatically mounts. Let’s say your mount...

Read More
Pete Lombardo

Simple Fail2Ban Alternative for FreePBX + SSH

I created a script to help secure Asterisk servers: fail-to-ban. It runs once per minute and will block an IP that tries, unsuccessfully, to authenticate more than a certain number of tries within a certain interval. It keeps track of each block and will automatically unblock an IP after a given amount of time elapses. All of these variables are easily set/tuned at the beginning of the script. It’s basic, easy to install, and effective. The installation is just two extremely easy steps. Create the file /scripts/fail-to-ban. Add a cron job entry to run it. /scripts/fail-to-ban /scripts/crontab After creating these files, simply run the following commands: That’s really all you need to do!

Load more posts