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
cd / | |
patch -p1 < /root/parse_ipsetentry.patch | |
ACTION=reload-sets utpl -S /usr/share/firewall4/main.uc |
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/sh | |
info=' | |
https://gist.github.com/levid0s/ed4b3ad883a183e0eda80b6c60b209e9 | |
Script for OpenWRT that queries the AdGuard Home API and retreives recent DNS query results, and updates an IPset file with the values. | |
This way, firewall and DNS access can be centrally managed from AdGuard, perhaps with a block-all rule /.*/ and manually adding exception. | |
Using this scirpt, those exceptions would propagate into OpenWRT firewall rules. | |
' |
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/ash | |
# https://gist.github.com/levid0s/2cb9f64234aab3b3a400b57d5d92f840 | |
set -eu | |
usage=" | |
Suggested crontab: | |
*/5 * * * * /root/dns_watch.sh 2>> /tmp/dns_watch.log | |
" |
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/sh | |
BACKUP_FILE="/tmp/proc_backup_$(date +%Y%m%d_%H%M%S).txt.gz" | |
start=$(date +%s) | |
nl=" | |
" | |
echo "Backing up /proc to: $BACKUP_FILE" | |
dump_proc() { |
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/sh | |
# https://gist.github.com/levid0s/xxxxxx/ | |
# Usage: | |
# download_cert.sh [-h] [-n] [-f] | |
# -h: Show help | |
# -n: Skip script update check | |
# -f: Force cert download, skip comparison | |
# Version: v20240714 |
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
# Disable Subscription Nag Dialog | |
ts=$(date +%Y%m%d-%H%M%S) && \ | |
pushd /usr/share/javascript/proxmox-widget-toolkit && \ | |
sed -z "-i.bak.$ts" 's/Ext.Msg.show({\n\s*title: gettext(\x27No valid subscription\x27),/void({ title: gettext(\x27No valid subscription\x27),/g' proxmoxlib.js && \ | |
! grep -q 'No valid subscription' proxmoxlib.js && \ | |
SYSTEMD_LOG_LEVEL=debug systemctl restart pveproxy.service 2>&1|egrep "Got result .* for job|Failed" && \ | |
echo "Success!" || echo "Error!" | |
# Switch apt to No-Subscription | |
sed -i 's&^deb https://enterprise.proxmox.com/debian/&# deb https://enterprise.proxmox.com/debian/&g' /etc/apt/sources.list.d/pve-enterprise.list |
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
plugins: | |
certinfo: | |
shortCut: Shift-I | |
confirm: false | |
description: Get TLS Cert Info | |
scopes: | |
- secret | |
command: sh | |
background: false | |
args: |
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
set -e | |
set -u | |
__usage=" | |
$0 | |
OpenWRT DDNS updater ('ddns-scripts') script for the Porkbun API. | |
The script has been extended to support running it directly (eg. via cron) without having to install the \`ddns-scripts\` opkg package. | |
Suggested script path: /usr/bin/ddns-update-porkbun.sh |
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
# https://forums.plex.tv/t/custom-domain-certificate-not-used/855774/15 | |
openssl pkcs12 -export -certfile fullchain1.pem -in cert1.pem -inkey privkey1.pem -out plex_new.pfx -name plex.domain.com -certpbe AES-256-CBC -keypbe AES-256-CBC -macalg SHA256 |
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
$ ssh [email protected] | |
Unable to negotiate with 192.168.1.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,[email protected] | |
$ ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -o PubkeyAuthentication=no -o PreferredAuthentications=password -o HostKeyAlgorithms=+ssh-rsa [email protected] | |
BusyBox v1.23.2 (2019-02-19 01:57:00 UTC) built-in shell (ash) | |
# sources: | |
# https://unix.stackexchange.com/questions/15138/how-to-force-ssh-client-to-use-only-password-auth | |
# https://unix.stackexchange.com/questions/340844/how-to-enable-diffie-hellman-group1-sha1-key-exchange-on-debian-8-0 |
NewerOlder