This file contains hidden or 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/sh | |
# shellcheck disable=SC2015,SC3003,SC3060 | |
# See https://www.iwik.org/ipcountry/ for list | |
GEO_PREFIX="SG" | |
GEO_URL="https://www.iwik.org/ipcountry" | |
TARGET_TABLE="inet fw4" | |
TARGET_INTERFACE="wan" | |
GEO_IPv4="/var/tmp/pbr_geo_ipv4.txt" |
This file contains hidden or 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/sh | |
# shellcheck disable=SC2015,SC3003,SC3060 | |
# ASN example | |
# Replace "ASN_" with a unique word to minimize conflicts with other asn based scripts | |
ASN_URL="https://stat.ripe.net/data/announced-prefixes/data.json?resource=AS138341" | |
ASN_JSON_FILE="/var/tmp/pbr_asn_ip_ranges.gz" | |
TARGET_TABLE="inet fw4" | |
TARGET_INTERFACE="wan" |
This file contains hidden or 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/sh | |
# shellcheck disable=SC2015,SC3003,SC3060 | |
FASTLY_URL="https://api.fastly.com/public-ip-list" | |
FASTLY_JSON_FILE="/var/tmp/pbr_fastly_ip_ranges.gz" | |
TARGET_TABLE="inet fw4" | |
TARGET_INTERFACE="wan" | |
cleanup() | |
{ | |
rm -f "$FASTLY_JSON_FILE" |
This file contains hidden or 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/sh | |
# shellcheck disable=SC2015,SC3003,SC3060 | |
AWS_URL="https://ip-ranges.amazonaws.com/ip-ranges.json" | |
AWS_JSON_FILE="/var/tmp/pbr_aws_ip_ranges.gz" | |
AWS_REGIONS="ap-southeast-3 ap-southeast-5 ap-southeast-1 GLOBAL" | |
TARGET_TABLE="inet fw4" | |
TARGET_INTERFACE="wan" | |
AWS_IPv4="/var/tmp/pbr_aws_ipv4.txt" | |
AWS_IPv6="/var/tmp/pbr_aws_ipv6.txt" |
This file contains hidden or 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/sh | |
# shellcheck disable=SC2015,SC3003,SC3060 | |
AZURE_URL="https://www.microsoft.com/en-us/download/details.aspx?id=56519" | |
AZURE_JSON_FILE="/var/tmp/pbr_azure_ip_ranges.gz" | |
AZURE_REGIONS="southeastasia southindia" | |
AZURE_ADD_EMPTY_REGION="n" | |
TARGET_TABLE="inet fw4" | |
TARGET_INTERFACE="wan" | |
AZURE_IPv4="/var/tmp/pbr_azure_ipv4.txt" |
This file contains hidden or 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
#Script to check for available memory | |
#If available memory is below certain amount, it will initiate shutdown | |
#The shutdown is done via rcon https://github.com/gorcon/rcon-cli | |
#You can get this script to be execute in crontab | |
#!/bin/bash | |
lock_file="/home/Palworld/Palworld/check_mem_leak.lock" | |
rcon_yaml="/home/Palworld/Palworld/rcon.yaml" | |
rcon="/home/Palworld/Palworld/rcon" |