Skip to content

Instantly share code, notes, and snippets.

View darylounet's full-sized avatar

Cyril AKNINE darylounet

  • Clever Age
  • Bordeaux
View GitHub Profile
@darylounet
darylounet / nat-ha-2020.yaml
Created November 15, 2020 16:26
AWS NAT HA with IPv6, Amazon Linux 2 and using aws-cli instead of deprecated apitools. Compatible with t4g Arm64 instances.
AWSTemplateFormatVersion: 2010-09-09
Description: >-
NAT HA: creates two NAT nodes in a new
VPC in a hot/hot NAT configuration. After successfully launching this
CloudFormation stack, you will have 4 subnets in 2 AZs (a pair of
public/private subnets in each AZ), with NAT instances routing outbound
traffic for their respective private subnets. The NAT instances will
automatically monitor each other and fix outbound routing problems if the
other instance is unavailable.
Based on https://aws.amazon.com/fr/articles/high-availability-for-amazon-vpc-nat-instances-using-aws-cloudformation-templates/
#!/bin/bash
# @Author Cyril Aknine <darylounet@gmail.com>
# Sophos XG Let's Encrypt certificate update script
# It uses huge workaround due to Sophos XG limitations :
# - can't update a certificate when it's used by WAF
# - can't update FirewallRule trough API to use another certificate
# - can't SCP a file trough SSH
# So ok it's ugly, but it's not the only one...
SOPHOS_IP="192.168.0.254"
@darylounet
darylounet / elb-internal-route53-updater.php
Last active September 18, 2023 12:03
ELB Internal Route53 Updater
#!/usr/bin/php
<?php
/**
* ELB Internal Route53 Updater
* @author Cyril Aknine https://github.com/darylounet
*/
$vpcId = 'your-vpc-id';
$elbNetworkDescription = 'Your ELB network interface description (generated like "ELB your-elb-name")';
$route53InternalHostedZoneId = 'Your Route53 Internal hosted zone ID';
@darylounet
darylounet / keybase.md
Created November 11, 2014 17:45
Keybase identity

Keybase proof

I hereby claim:

  • I am darylounet on github.
  • I am d4ryl (https://keybase.io/d4ryl) on keybase.
  • I have a public key whose fingerprint is 8B35 B5FE 88F6 7B9C 0D59 2157 B70D D0E4 1381 2E6E

To claim this, I am signing this object: