Skip to content

Instantly share code, notes, and snippets.

View stefanux's full-sized avatar

stefanux stefanux

View GitHub Profile
@stefanux
stefanux / etc -> powerdns -> adfilter.lua
Last active January 24, 2024 19:56
Complex Example on dnsdist 1.7.x (Port 53 with ratelimiting) in front of powerdns recursor 4.8.4 (Port 5353, same host). lua is used to filter out a list of domains.
-- source: https://gist.github.com/ahupowerdns/bb1a043ce453a9f9eeed
-- returns "0.0.0.0" or "::" when match from adfilter_blocklist.lua
adservers=newDS()
function preresolve(dq)
if(not adservers:check(dq.qname)) then
return false
end
if(dq.qtype == pdns.A) then
@stefanux
stefanux / letsencrypt-fix-deployhooks-loop.yml
Created February 6, 2022 21:13
letsencrypt-fix-deployhooks.yml
---
# fixes renewal config-files to include deploy_hook depending on authentificator
# you can override letsencrypt_deployhook in host_vars/group_vars
# and set letsencrypt_pre_hook or letsencrypt_post_hook (if needed)
- hosts: all
gather_facts: False
become: yes
vars:
@stefanux
stefanux / rules-both.iptables
Created August 4, 2021 14:43 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is