This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division, print_function | |
import click | |
import boto3 | |
import os | |
import socket | |
from botocore.exceptions import ClientError | |
def create_security_groups(region, ipv4, vpcid, group_name): | |
new_group = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -- Assumptions/Warnings: | |
# -- You're not using any kind of NAT or custom iptables rules already on the Pi (as these will be wiped) | |
# -- <PUT_IP_ADDRESS_HERE> is the device you wish to exclude | |
# -- 1.1.1.1 is the DNS server you wish excluded devices to use (this is the cloudflare server) | |
# -- stolen from https://www.reddit.com/r/pihole/comments/56y6lb/ignore_one_device_completely/d8niqzi | |
# Run as root/sudo it. | |
sysctl net.ipv4.ip_forward=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
from time import sleep | |
import boto3 | |
import requests | |
SPOT_URL = 'http://169.254.169.254/latest/meta-data/spot/instance-action' | |
ID_URL = 'http://169.254.169.254/latest/meta-data/instance-id' | |
EC2 = boto3.client('ec2') |