Skip to content

Instantly share code, notes, and snippets.

@marfillaster
marfillaster / unifi_container_rb5009.md
Last active December 30, 2023 14:03
Running Unifi Network Controller as a container in MikroTik ROSv7 RB5009

Requirement

  • USB flash drive - this is where the container filesystem will be persisted

Set-up docker bridge network

/interface bridge add name=docker

Set-up veth to be used by container

@marfillaster
marfillaster / Converge-F670L.md
Last active February 12, 2024 09:40
Converge F670L Bridge mode
  1. Go to Network - WAN - WAN Connection WAN Connection
  2. Right click Type Route dropdown select and click "Inspect" in the context menu.
    In console, run the code below:
    document.getElementById('Frm_mode').options[document.getElementById('Frm_mode').options.selectedIndex].setAttribute('value', 'BRIDGE');
    Change_mode();
    
    output2
  3. Input New Connection Name. Example: Bridge. Click Create.
@marfillaster
marfillaster / guide.md
Last active September 6, 2022 12:32
Ubiquiti UniFi Guest SSID on VLAN using MikroTik router hybrid port
  • Main network on 192.168.88.0/24
  • Guest network on 172.16.0.0/24 VLAN20
  • UniFi AP is connected to a MikroTik router ether2 via DHCP assignment
  • UniFi AP can be managed on via main network
  • MikroTik initially on default configuration
/interface bridge port
add bridge=bridge interface=ether2
@marfillaster
marfillaster / router.cfg
Last active April 1, 2024 01:36
MikroTik RouterOS v7 dual DHCP WAN recursive failover w/ PCC load-balancing; and recursive ECMP
# feb/11/2022 11:00:55 by RouterOS 7.2rc3
# software id = 9QK9-C798
#
# model = RB5009UG+S+
# serial number = XXXXXXXXXX
/ip settings set allow-fast-path=no
/interface bridge add admin-mac=FF:FF:FF:FF:FF:FF auto-mac=no name=bridge
@marfillaster
marfillaster / guide.md
Last active March 8, 2023 08:36
yubikey ssh ykcs11 in osx
# ~/.ssh/config
Host *
    PKCS11Provider /usr/local/lib/libykcs11.dylib

brew install ykman yubico-piv-tool

# Generate key
ykman piv keys generate -aRSA2048 --pin-policy ONCE --touch-policy NEVER 9a public.pem
@marfillaster
marfillaster / bridge-mode.md
Last active June 18, 2021 06:05
PLDT VDSL HG180U notes

Bridge mode

This guide will enable bridge mode in ethernet port 3 only. Wifi and ethernet ports 1 and 2 will remain in route mode.

Use cases:

  • Avoid double NAT.
  • Improve WiFi performance by using dedicated and/or more modern equipment.
@marfillaster
marfillaster / gist:d34bd199b9e265ccd74af6d31fd9df85
Last active October 9, 2023 05:51
Mikrotik IPv6 dns-over-https doh cloudflare google
# https://forum.mikrotik.com/viewtopic.php?t=132657
/ipv6 dhcp-server option
add code=23 name=recursivens6 value=0xfd000000000000000000000000000001
/ipv6 dhcp-server
add dhcp-option=recursivens6 interface=bridge lease-time=30m name=dhcp6
/ipv6 pool
add name=ULA-pool6 prefix=fd00::/64 prefix-length=64

Keybase proof

I hereby claim:

  • I am marfillaster on github.
  • I am marfillaster (https://keybase.io/marfillaster) on keybase.
  • I have a public key whose fingerprint is 9828 F7AA 8E16 009E A8FB 5913 3798 FD80 20D3 229E

To claim this, I am signing this object:

#!/bin/sh
# pantheon-backup-to-s3.sh
# Script to backup Pantheon sites and copy to Amazon s3 bucket
#
# Requirements:
# - Pantheon terminus cli
# - Valid terminus machine token
# - Amazon aws cli
# - s3 cli access and user configured
@marfillaster
marfillaster / gist:bc79f4dc789f814f81c7b05060325469
Last active October 14, 2022 04:46
Expo.io WSL2 port-forwarding

set REACT_NATIVE_PACKAGER_HOSTNAME to host IP

wsl$ ifconfig eth0 | grep 'inet '
        inet 172.19.131.1  netmask 255.255.240.0  broadcast 172.19.143.255

PS Admministrator> netsh interface portproxy add v4tov4 listenport=19000 listenaddress=0.0.0.0 connectport=19000 connectaddress=172.19.131.1
PS Admministrator> netsh interface portproxy add v4tov4 listenport=19001 listenaddress=0.0.0.0 connectport=19001 connectaddress=172.19.131.1