Skip to content

Instantly share code, notes, and snippets.

View nasirhafeez's full-sized avatar

Nasir Hafeez nasirhafeez

View GitHub Profile
@nasirhafeez
nasirhafeez / opennds-guide-openwrt-youtube.md
Created July 20, 2024 11:27
OpenNDS Guide for OpenWRT - Youtube Companion

OpenNDS Guide for OpenWRT: Youtube Companion

This setup has been tested successfully on GL.iNet GL-MT300N-V2 device with OpenWRT v22.

Firewall Setup

By default OpenWRT firewall does not allow web or SSH access on WAN IP. As a captive portal blocks all traffic on LAN until user is authenticated so when we initially enable captive portal on OpenWRT we lose access to the router from LAN side. To manage our OpenWRT we should therefore open access from WAN side.

Access your OpenWRT router via Luci interface. Go to Network => Firewall => Traffic Rules and add a new rule for opening port 80 (HTTP):

@nasirhafeez
nasirhafeez / walled-garden.md
Last active August 14, 2024 13:50
Walled Garden

Walled Garden

Google

ssl.gstatic.com
accounts.google.com
accounts.google.com.pk (or other local domain)
www.gstatic.com
fonts.gstatic.com
@nasirhafeez
nasirhafeez / opennds-commands.md
Created August 15, 2023 07:24
openNDS Commands

OpenNDS Commands

OpenNDS Documentation

Tested successfully on GL.iNet GL-MT300N-V2 device with OpenWrt 22.03.5 (stock OpenWRT firmware, not GL.iNet firmware).

Note: faskey in config file is generated dynamically and is present at the end of the config file.

Installation

@nasirhafeez
nasirhafeez / tp-link-omada-lets-encrypt-ubuntu.md
Created March 12, 2023 09:26
TP Link Omada Let's Encrypt Certificate on Ubuntu 20
@nasirhafeez
nasirhafeez / mikrotik-api-routerosv7.md
Created January 24, 2023 07:36
Mikrotik API RouterOS v7

Mikrotik API RouterOS v7

Prerequisites for enabling Rest API access in Mikrotik:

Allow in firewall:

/ip firewall filter add action=accept chain=input
@nasirhafeez
nasirhafeez / freeradius-setup.md
Last active August 12, 2024 08:07
FreeRADIUS Setup

FreeRADIUS Setup

Install FreeRADIUS:

apt-get install freeradius freeradius-mysql freeradius-utils

Allow all NAS clients to connect to it:

@nasirhafeez
nasirhafeez / coova-chilli-commands.md
Last active April 24, 2024 16:31
Coova Chilli Commands

Coova Chilli Commands

Installation

Recommended OpenWRT firmware version: OpenWRT 19. Newer versions do not have iptables installed by default so Coova Chilli will not work out of the box

opkg update
opkg install coova-chilli nano
@nasirhafeez
nasirhafeez / lamp-server-setup-ubuntu-20.md
Last active September 10, 2024 11:24
LAMP Server Setup on Ubuntu 20
@nasirhafeez
nasirhafeez / kubernetes-commands.md
Last active May 29, 2022 11:02
Kubernetes Commands

Kubernetes Commands

List Pods

kubectl get pod
kubectl describe pod <pod_name>
kubectl get po -o wide
@nasirhafeez
nasirhafeez / notepad-regexp-substitution-and-backtracking.md
Last active August 7, 2022 06:48
NotePad++ Regular Expressions, Substitution and Backtracking

NotePad++ Regular Expressions, Substitution and Backtracking

To replace dates of the format yyyy-mm-d with the format yyyy-mm-dd use the following find expression:

^(....-..-)(.)$

And the following replace expression:

\10\2