Skip to content

Instantly share code, notes, and snippets.

View SmartFinn's full-sized avatar
🇺🇦

Serhii Yeremenko SmartFinn

🇺🇦
  • Ukraine
  • 08:06 (UTC +03:00)
View GitHub Profile
@SmartFinn
SmartFinn / dhcp-leases-to-dns.rsc
Last active April 2, 2025 14:12
MikroTik (RouterOS) script for automatically setting DNS records for clients when they obtain a DHCP lease
# MikroTik (RouterOS) script for automatically setting DNS records
# for clients when they obtain a DHCP lease.
#
# author SmartFinn <https://gist.github.com/SmartFinn>
:local dnsTTL "00:15:00";
:local token "$leaseServerName-$leaseActMAC";
# Normalize hostname (e.g. "-= My Phone =-" -> "My-Phone")
# - truncate length to 63 chars
@SmartFinn
SmartFinn / ip_firewall_filter.rsc
Last active February 27, 2025 15:03
MikroTik (RouterOS) Zone-Based Firewall Example
# jan/29/2018 22: 4:17 by RouterOS 6.41
#
/interface list
add name=public comment="public network"
add name=local comment="local network"
add name=guest comment="guest network"
# Change the interfaces below to your own
/interface list member
add list=public interface=ether1
@SmartFinn
SmartFinn / DockerHelper.mk
Last active December 3, 2022 11:51
Makefile for Docker as a simple replacement for docker-compose for working with a single service
# DockerHelper.mk is a simple replacement for docker-compose for
# working with a single service.
#
# Usage Examples:
# - https://gist.github.com/SmartFinn/7bb86b078726f0763ce0#file-usage-md
# - https://github.com/SmartFinn/Dockerfiles
#
# @author: Sergei Eremenko (https://github.com/SmartFinn)
# @license: Unlicense (http://unlicense.org)
# @link: https://gist.github.com/SmartFinn/7bb86b078726f0763ce0