Skip to content

Instantly share code, notes, and snippets.

View it-engineer-pro's full-sized avatar
🎯
Focusing

Vladimir Chernyshev it-engineer-pro

🎯
Focusing
View GitHub Profile
@it-engineer-pro
it-engineer-pro / update_root_hints.sh
Last active May 30, 2024 20:58 — forked from lyjacky11/update_root_hints.sh
Update root.hints file for Pi-Hole Unbound Service
#!/bin/bash
# wget -nv -O named.root https://www.internic.net/domain/named.root
echo "[i] Backing up root.hints ..."
cd /var/lib/unbound
sudo cp root.hints $(date +%F).root.hints
if [ -s $(date +%F).root.hints ]
then
echo "[✓] Backup root.hints success!"
echo ""
@it-engineer-pro
it-engineer-pro / README.md
Created February 12, 2024 00:13 — forked from magnetikonline/README.md
BIND - delegate a sub domain for a zone.

BIND - delegate a sub domain for a zone

The scenario:

  • DNS zone myzone.com defined in BIND.
  • Authoritative name server at 123.16.123.1.
  • Subzone sub.myzone.com with an authoritative name server at 123.16.123.10.
  • Wishing to forward sub-zone to authoritative name server.

Config

@it-engineer-pro
it-engineer-pro / IPTABLES-CHEATSHEET.md
Created May 10, 2024 17:43 — forked from davydany/IPTABLES-CHEATSHEET.md
IP Tables (iptables) Cheat Sheet

IP Tables (iptables) Cheat Sheet

IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.

Resources

The following list is a great set of documentation for iptables. I used them to compile this documentation.

@it-engineer-pro
it-engineer-pro / ipv4-filter.sh
Created May 21, 2024 22:53 — forked from danrl/ipv4-filter.sh
Very basic packet filters with non-atomic loading. Be careful!
#!/bin/bash
echo -n "loading ipv4 packet filter... "
### clear tables
iptables --flush
iptables --delete-chain
iptables --table mangle --flush
iptables --table mangle --delete-chain

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal