Skip to content

Instantly share code, notes, and snippets.

@mdpuma
mdpuma / WINDOWS_NOTES.md
Last active December 9, 2025 19:04
copy_vm_proxmox_lve.sh
@mdpuma
mdpuma / csfpost.sh
Last active May 10, 2026 09:13
change csf/lfd firewall to cphulk blocking
#!/bin/bash
iptables -N DROP_OUT_HTTP
iptables -A DROP_OUT_HTTP -j LOG --log-prefix "DROP_OUT_HTTP: " --log-uid
iptables -A DROP_OUT_HTTP -p tcp --syn -j REJECT --reject-with tcp-reset
iptables -N OUT_HTTP
#iptables -A OUT_HTTP -p tcp -m owner --uid-owner tucanorate -j DROP_OUT_HTTP
iptables -A OUT_HTTP -p tcp -m string --string "HTTP" --algo kmp --to 100 -j NFLOG --nflog-group 5
iptables -A OUT_HTTP -p tcp --syn -j LOG --log-prefix "OUT_HTTP: " --log-uid
@mdpuma
mdpuma / voxility.sh
Created July 11, 2021 15:11
voxility.sh
#!/bin/bash -e
action=$1
argument=$2
IPS="1.1.1.1/24 2.2.2.2/24"
case "$action" in
listips)
#for i in $IPS; do
@mdpuma
mdpuma / gist:12a73204fbb9e0fa6b43ce45affdb0c9
Last active February 23, 2021 09:48
tcpdump vlan capture tag priority
#!/bin/sh
# VLANID is 10 | 0xa
# VLANID is 20 | 0x14
# VLANID is 3342 | 0x0d0e
# VLANID is 3340 | 0x0d0c
# https://www.binaryhexconverter.com/hex-to-binary-converter
# https://www.tcpdump.org/manpages/pcap-filter.7.html
@mdpuma
mdpuma / bgp_agent.map
Last active January 23, 2022 16:20
pmacctd monitor incoming traffic mismatch
bgp_ip=127.0.0.1 ip=0.0.0.0/0
@mdpuma
mdpuma / vsololt.rb
Created December 13, 2020 07:18
VSOL OLT oxidized model
class VSOLOLT < Oxidized::Model
prompt /^([\w.@()-]+[#>]\s?)$/
comment '! '
cmd :all do |cfg|
cfg.gsub! /^% Invalid input detected at '\^' marker\.$|^\s+\^$/, ''
cfg.cut_both
end
@mdpuma
mdpuma / gist:2ba5a4faa6d413fa84687a697b2799f6
Last active November 27, 2020 08:32
Giramondo Symbol MC3190
Q: Wifi cant connect
A: Disable in Wifi Options -> Regulatory -> Enable 802.11d
2x rdp client
https://kb.parallels.com/en/124103
@mdpuma
mdpuma / Filter BPDU packets on bridge
Last active April 18, 2026 09:46
Mikrotik scripts
/interface bridge filter
add action=drop chain=output comment="DROP RSTP BPDU" dst-mac-address=\
01:80:C2:00:00:00/FF:FF:FF:FF:FF:FF out-interface=ether1
add action=drop chain=output comment="DROP RSTP BPDU" dst-mac-address=\
01:80:C2:00:00:00/FF:FF:FF:FF:FF:FF out-interface=ether10
# no interface
add action=drop chain=output comment="DROP RSTP BPDU" dst-mac-address=\
01:80:C2:00:00:00/FF:FF:FF:FF:FF:FF out-interface=*45
DHCP client port 68
DHCP server port 67
client > server discover broadcast
client > server request unicast
server > client reply ACK unicast
@mdpuma
mdpuma / fix cpanel iptables rules insertion
Created April 12, 2020 06:56
Fixing cpanel cP-Firewall-1-INPUT rules insertion
crontab -e
*/5 * * * * /sbin/iptables -D INPUT -j cP-Firewall-1-INPUT 2> /dev/null && echo "cP-Firewall-1-INPUT Removed"