Skip to content

Instantly share code, notes, and snippets.

View KoeSystems's full-sized avatar

Koe KoeSystems

View GitHub Profile
@KoeSystems
KoeSystems / delete_default_vpc.tf
Last active November 17, 2020 19:41
Delete default VPC network in GCP with Terraform
###############################################################################
# Delete Default VPCs
###############################################################################
resource null_resource delete_default_vpc {
triggers = {
always = timestamp()
}
provisioner "local-exec" {
command = <<-EOT
### Keybase proof
I hereby claim:
* I am KoeSystems on github.
* I am koecloudsystems (https://keybase.io/koecloudsystems) on keybase.
* I have a public key whose fingerprint is AAF2 EE21 B67F 8100 C371 5FAC CDB8 FDFF 7939 5417
To claim this, I am signing this object:
@KoeSystems
KoeSystems / ddos_discovery.md
Last active February 16, 2021 20:06
DDoS origin discovery

Caveats!! a human brain must be used !!!

First, get ALL your access IPs from your HTTP server

cut -d' ' -f1 /var/log/nginx/access.log | sort | uniq > /tmp/all_ips

Now we can use a docker image to have the IPtoASN API https://iptoasn.com/ running locally

docker run -itd --name my-iptoasn -p 80:53661 ilyaglow/iptoasn-webservice