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

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
@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 / 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 ""
@flaviovs
flaviovs / README.md
Last active May 19, 2024 09:29
How to use TARPIT in Linux without consuming (your) resources

Iptables(8) TARPIT is a useful security mechanism that can slow down or stop attacks on a network. If everyone used TARPIT to block attackers, in theory their resources would be exhausted as their connection attempts would be delayed, which would discouraged people from attempting unauthorized access. Here's a brief description of how TARPIT works:

To achieve this tar pit state, iptables accepts the incoming TCP/IP connection and then switches to a zero-byte window. This forces the attacker's system to stop sending data, rather like the effect of pressing Ctrl-S on a terminal. Any attempts by the attacker to close the connection are ignored, so the connection remains active and typically times out after only 12–24 minutes. This consumes resources on the attacker's system but not

@lyjacky11
lyjacky11 / update_root_hints.sh
Created August 20, 2022 19:26
Update root.hints file for Pi-Hole Unbound Service
#!/bin/bash
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 ""
@egernst
egernst / iptables-cheatsheet.md
Last active June 12, 2024 21:28 — forked from mcastelino/iptables-cheatsheet.md
iptables-cheatsheet

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
@davydany
davydany / IPTABLES-CHEATSHEET.md
Last active May 27, 2024 14:55
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.

@magnetikonline
magnetikonline / README.md
Last active June 18, 2024 05:43
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