Skip to content

Instantly share code, notes, and snippets.

View mvandermeulen's full-sized avatar

Mark mvandermeulen

  • Fivenynes
  • Sydney, Australia
  • 20:37 (UTC +10:00)
View GitHub Profile
@mvandermeulen
mvandermeulen / ntop.md
Created December 17, 2020 15:50 — forked from JosefJezek/ntop.md
How to use ntop
@mvandermeulen
mvandermeulen / zt_VPN.md
Created December 17, 2020 15:51 — forked from markus2120/zt_VPN.md
Route all traffic with a raspberry pi like a VPN
@mvandermeulen
mvandermeulen / pihole-dietpi-cloudflared.md
Created December 17, 2020 15:52 — forked from magnolialogic/pihole-dietpi-cloudflared.md
DNS over HTTPS with DietPi, Pi-hole, and Cloudflare DNS

DietPi + Pi-hole + Cloudflare DNS + DNS over HTTPS

Summary

Quick and dirty setup instructions to get Pi-hole running with DoH via Cloudflare on a headless Raspberry Pi.

I was originally using Pi-hole with Quad9 as my upstream DNS provider, but noticed that my ISP (Spectrum) was still intercepting and answering some DNS queries so I've switched to Cloudflare and their Argo Tunnel client for DNS over HTTPS.

Yes, I know there are other options out there like unbound, stubby, DNS over TLS, and DNSCrypt, but as of this writing the whole encrypted DNS thing still feels really runny so I went with cloudflared because it's a single package that's easy to configure, update, and remove. This combination gets me to a place where my network is using encrypted DNS + DNSSEC and should automagically support ESNI once Safari implements it, and I could easily back out of DNS over HTTPS if DoT or DNSCrypt becomes more fully-baked before DoH does. I'll also happily switch back to Quad9 if they provide a DoH pr

Cloudflare DDNS using Bash Script with Crontab/ Systemd Timer

This script will check if external IP is changed or not and will update the external IP of A or AAAA record in Cloudflare DNS using API token/ global API key method.

Script Requirements

@mvandermeulen
mvandermeulen / Mikrotik
Created December 17, 2020 15:57
Mikrotik commands, tips and triks.
_5
get mac address:
put [/interface ethernet get [/interface ethernet find default-name=ether1] mac-address ]
***********************************************************
add ip address:
ip address> add address=10.10.10.1/24 interface=ether2-sw
***********************************************************
route ip:
ip route add dst-address=0.0.0.0/0 gateway=my.gate.way.ip
***********************************************************

Configuring Mellanox Switches

  1. Login to management console using admin:admin
  2. enable
  3. configure terminal
  4. vlan ### ### is the VLAN id, we use 198 and 199.
  5. Then the terminal will enter VLAN configuration mode, we set name to vlan### with name ###
  6. exit VLAN configuration mode
  7. Configure connect ports. For switch with VLAN 199, ethernet ports 1/1, 1/3, 1/5, 1/7 are connected to each server's eth2. For switch with VLAN 198 ethernet ports 1/10, 1/12, 1/14, 1/16 are connected to each server's eth3.

For each connected port, do the following:

@mvandermeulen
mvandermeulen / Dockerfile
Created December 17, 2020 16:09 — forked from ruffsl/Dockerfile
Small ROS Network Example
FROM ros:indigo-ros-base
# install ros tutorials packages
RUN apt-get update && apt-get install -y \
ros-indigo-ros-tutorials \
ros-indigo-common-tutorials \
&& rm -rf /var/lib/apt/lists/
@mvandermeulen
mvandermeulen / patterns-of-enterprise-application-architecture.md
Created December 17, 2020 16:10 — forked from paulstatezny/patterns-of-enterprise-application-architecture.md
Notes from Patterns of Enterprise Application Architecture by Martin Fowler

Patterns of Enterprise Application Architecture

By Martin Fowler (2002)

Chapter 1: Layering

A basic example of layering: FTP < TCP < IP < Ethernet

Benefis of layering:

  • You can understand a layer without knowing much about the others.
  • Minimize dependencies.