Skip to content

Instantly share code, notes, and snippets.

View rooty's full-sized avatar
🏠
Working from home

Vitalii Mikhnevych rooty

🏠
Working from home
View GitHub Profile
@rooty
rooty / update_aws_nova_blocklist.sh
Created May 27, 2025 11:40
Update AWS Nova ip poll
#!/bin/bash
# Тимчасовий файл
TMP_FILE="/tmp/aws_ca_central_1_ips.txt"
NGINX_BLOCK_FILE="/etc/nginx/aws-nova-deny.conf"
# Завантажити актуальний список IP
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | \
jq -r '.prefixes[] | select(.region=="ca-central-1") | "deny \(.ip_prefix);"' > "$TMP_FILE"
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAhuiKfA6RhdGvW4frqrUgwHy0sSGP+a2kFQHi5vuhGQ
@rooty
rooty / ban-ip.txt
Last active September 12, 2024 10:10
bad ip for Nginx
146.70.178.254/32
91.199.118.51/32
91.199.118.51/32
146.70.178.164/32
149.88.106.153/32
146.70.178.164/32
216.24.216.217/32
20.37.101.39/32
172.207.171.136/32
194.233.73.44/32
@rooty
rooty / .ebextensions\https-instance-securitygroup.config
Created September 5, 2021 21:48 — forked from Guneetgstar/.ebextensions\https-instance-securitygroup.config
Amazon Elastic Beanstalk with SSL (HTTPS) without a Load Balancer on Single Instanced EC2 Amazon Linux 2 Image (Java)
######
## See https://github.com/awsdocs/elastic-beanstalk-samples/tree/main/configuration-files/aws-provided/security-configuration for refrence.
# .ebextensions/https-instance-securitygroup.config
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
Source code for article http://ifdattic.com/integrating-datadog-and-logstash-on-aws-ec2/
The first line provides the full file path, remove it from real files!
@rooty
rooty / docker-compose.yml
Created December 6, 2020 00:59 — forked from mTrax-/docker-compose.yml
Traefik v2 with ssl
version: "3.3"
services:
reverse-proxy:
image: traefik:latest
restart: unless-stopped
command:
- --api
- --providers.docker=true
- --entrypoints.web.address=:80
@rooty
rooty / jail.conf
Created June 16, 2020 11:33 — forked from AysadKozanoglu/jail.conf
fail2ban nginx 404 400 403 444 filter /etc/fail2ban/filter.d/nginx-4xx.conf enable
# to enable this filter add to jail.conf following (/etc/fail2ban/jail.conf)
# Thanks to -> TheBarret
[nginx-4xx]
enabled = true
port = http,https
logpath = /var/log/nginx/access.log
maxretry = 3
@rooty
rooty / minecraft_do.yml
Created October 18, 2019 09:15 — forked from rdhyee/minecraft_do.yml
Ansible playbook to launch a digitalocean droplet and then configure it to run Minecraft based on instructions from https://www.digitalocean.com/community/articles/how-to-set-up-a-minecraft-server-on-linux Note that some things are hardwired: the name of the droplet, the version of minecraft
# http://www.ansibleworks.com/docs/modules.html#digital-ocean
# Create a new Droplet
# Will return the droplet details including the droplet id (used for idempotence)
- name: launch DO droplet
hosts: local
gather_facts: False
tasks:
- name: pwd
@rooty
rooty / updateSecret.sh
Created October 18, 2019 07:03 — forked from 6be709c0/updateSecret.sh
A simple command to finally update the docker secret !
#!/usr/bin/env bash
# HOW TO USE
# ./updateSecret.sh secretName newValue
# It's that simple !
if [ "$#" -ne 2 ];
then
echo "#####"
echo "You must supplied secretName newValue"
@rooty
rooty / tunnelbroker-net.sh
Created August 16, 2019 13:07 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
#!/bin/bash
#### This script is published by Philipp Klaus <[email protected]>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x