Recently I needed to block all public egress from our VPC. I could see we still have some NTP traffic going out to time.aws.com . Initially I started following AWS documentation Set the time reference … , but quickly realized it is outdated for amazon linux instances. This article describe how to set NTP on EC2 (Amazon Linux 2023) to only link local NPT server. By default, EC2 instances is…
When a task is started, the Amazon ECS container agent creates an additional pause container for each task before starting the containers in the task definition. It then configures the network namespace of the pause container by running the amazon-ecs-cni-plugins CNI plugins. The agent then starts the rest of the containers in the task so that they share the network stack of the pause container.…
Working with IPs and CIDR blocks in golang is quite easy. Because binary is just a number, first we can create helper functions to convert from integer to IP (and vice versa) plus get CIDR mask as integer. package main import ( "encoding/binary" "net" ) func getMask ( ip * net . IPNet ) uint32 { return 0xFFFFFFFF ^ binary . BigEndian . Uint32 ( ip . Mask ) } func intToIP ( i uint32 ) net . IP { b…
I have chosen the following setup because of simplicity and cost (the only paid part is S3 and even this is quite minimal). Setup consists of: hugo static website builder s3 hosting travis ci/build cloudflare DNS, CDN, … hugo I wanted some simple framework that builds website/blog from markdown files. Hugo seems to be very good option. build static pages I use makefile build target to…