Showing posts from September, 2021

Monitoring Hosts and Domains for RBL Listing Using Azure - Part 1: Design

The thing that prompted the publishing of this series of posts is a recent case of a customer with a large mail platform. The Mail Transfer Agents handling the internet mail flow for such a platform are usually susceptible to being flagged as malicious on RBLs, causing issues with mail flow. The solution described in these posts helps monitor the status on the RBLs and trigger alerts in service management systems, using modern cloud application development techniques. But wait, what is an RBL? A Real Time Block list is a service that keeps track of the domain and/or the IP address of the hosts reported to be sending SPAM or malicius messages. RBLs are actual DNS zones where IP addresses or domain names are represented by A records. Let's take a list, say, for example. To check if the host with IP is listed we have to query the DNS for the host If there is no such host known (the responce is NXDOMAIN) the host

Deploy Bicep/ARM using Containers

Developing using containers offers the ability to use different environments and software without having to install them on your development workstation, while at the same time you conserve a lot of system resources avoiding the use of virtual machines. Visual Studio Code has been receiving a lot of functionality towards that end with a great deal of extensions and part of that is targeting Azure template developement.  We can use VS Code to develop our code and then use a container with all the Azure tools to deploy. This post describes this very process, from docker installation to VS Code configuration and finally template deployment.  First we need to install all the necessary components on our system. This includes Docker Desktop, Visual Studio Code and a patch for the linux kernel of Windows Subsystem for Linux (WSL 2). You can find Docker Desktop on the official Docker page here  and VS Code on its page over here . The Docker installation wizard will add any required Windows fea

Reporting Progress with Powershell

Often in the life of an IT engineer or administrator, the command shell is a means of performing an operation on multiple items that would otherwise take a significant amount of time if performed via GUI tools.  When planning for such operations, reporting on progress is a nice thing to have, since it may take a while for the entire operation to complete and we need to know if things are working out as expected. In the majority of the cases, we know the actions that need to be taken in advance and thus the easiest way to go through them is to use a For loop. With For we start processing the items in an array or list either from its start or end and work our way to the last item by incrementing, usually by one. The Powershell code below will get the items in the current directory and sequentially process them, reporting the status of the operation after each item: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 # Get the list of items to process $items = @ ( Get-ChildItem ) # Loop thr

Merging Commits in Git

The adoption of cloud technologies has introduced a new way of managing resources, whether they are related to infrastructure, security, applications, etc. In the past, code repositories such as Git were just used manage application code, but now we use them to manage pretty much everything. However, not everyone is familiar with repositories and their principals and that sometimes leads to issues. A very common practice I've come across many times lately is having too many commits related to a single feature or request. I'm not suggesting commiting only big chunks of code that contain many changes at once, but instead getting rid of multiple commits that each one may overlap with the previous one or just contains minor changes. At least when pushing to a remote source that other people my be watching.  The three most common ways to clean up commits are reset , merge and rebase . For demonstration purposes we'll be working with a repository that contains Azure ARM template