Avatar (Fabio Alessandro Locati|Fale)'s blog

VPN with NAT in Google Cloud

March 1, 2020

Google Cloud provides the capability of terminating a VPN connection with a VPN Gateway. The problem is that the VPN Gateway - at the moment - is relatively limited in capabilities. One of the missing capabilities I would have liked to see implemented is the NAT capability. VPNs can be used to connect the machines of two different parties. Although this is usually not the best architectural pattern, since a connection on the public internet encrypted at the Transport Layer is often a better option, it’s relatively common in more legacy environments.

Read More

Calling a SOAP service in Go

December 3, 2018

Today the IT world is very focused on high performance, high throughput interfaces. In this situation, it is common to find REST and gRPC API, given their performances compared to the other solutions. Sometimes, though, we still encounter old API written with older techniques or new API that for some reasons have been developed with outdated technologies. One of those cases that I’ve encountered a few times over the last few months is SOAP.

Read More

CORS with Go and Negroni

November 18, 2018

There are some pieces that you need to put in every microservice you write. Those are for instance logging, error handling, authentication. Over the last year, I found myself writing over and over CORS headers. This requirement brought me to think that I should have used a Negroni middleware since we are already using Negroni for other middlewares. I started looking online for an already written one, and I found a bunch, but I was not happy with what I found, so I decided to write my own.

Read More

A lightweight approach to Go vanity import paths

September 23, 2018

Golang forces its users to use the repository URL of the dependency in the import statement. For instance, if we want to import the “test” package that is hosted at github.com/fale/test, we will need to use github.com/fale/test. In one hand this is very nice since it allows anyone reading the code to immediately understand where the code is hosted and therefore finding it very quickly. Also, this URL-based import path guarantees that no two different packages can have the same import path, preventing this kind of confusion for both programmers and the compiler itself.

Read More

A small HTTP debug server in Go

August 31, 2018

Lately, I found myself to work on an application that was communicating via SOAP with a server. My goal was to understand how this application worked with the SOAP server to emulate its behavior. Even if I had access to the source code of the application, I thought it would have been easier, faster and more fun to do the work without actually reading the code. It’s important to note that actually, the application is fairly small and self-contained.

Read More

libVirt on Hetzner

April 26, 2017

After many years of using Hetzner as a server provider, and having rented from them multiple servers for many reasons, I decided to rent a server with 128Gb of RAM to do some tests with many (virtualized) machines on top of CentOS. As it often happens, hosting providers put in place a lot of security measurements that sometimes make doing simple stuff more complex. The first approach I tried was using the (only) Ethernet interface as a bridged interface, but that did not brought me very far.

Read More

The Wireshark Field Guide by Robert J. Shimonski (Elsevier)

April 2, 2014

I usually don’t start with this, but lately I had some time constraints that made me wondering if is right to use so much time reading books. The Wireshark Field Guide Analyzing and Troubleshooting Network Traffic by Robert J. Shimonski is only 149 pages long (if we cut the introduction, indexes, etc. it boils down to 128 pages). This is a really short book and I have really appreciated this fact.

Read More

Exam Ref 70-413: Designing and Implementing a Server Infrastructure by Steve Suehring (Microsoft Press)

January 29, 2013

I come to this book less than a month after reviewing the 70-410 Exam Ref. As the title may suggest, this book is tailored to the preparation of the Microsoft 70-413 exam. Speaking of the exam, I have to advice that the book does cover any exam objective, but does not cover every exam question. The book is split into an introduction, 5 chapters and the index. The first chapter helps to understand how to plan and deploy a server infrastructure.

Read More

CompTIA Network+ Training Kit (Exam N10-005) by Craig Zacker (Microsoft Press)

January 1, 2013

Reading this book has helped me a lot understanding better how the networking works. This book is tailored for the CompTIA Network+ certification (and this led me to this book instead of another one, since I’m looking forward to take this certification. I really liked the “structureness” of this book. After a brief introduction (Chapter 1) the book author analyzes the whole networking stack starting from ground up. The first chapters, in fact, are about Physical layer (Chapter 2), Data-Link Layer (Chapter 4) and Network Layer (Chapter 6).

Read More