Skip to content

Instantly share code, notes, and snippets.

braian87b

View GitHub Profile
@braian87b
braian87b / wireless-link-wds.sh
Last active Jul 22, 2020
How to setup Wireless Links to avoid Wired backbone using WDS on Atheros for OpenWRT / LEDE
View wireless-link-wds.sh
@braian87b
braian87b / pure_debian_on_iomega_ez.sh
Last active Jul 19, 2020
How to Install pure Debian on Iomega EZ Media and Backup Center
View pure_debian_on_iomega_ez.sh
# Relevant info about this:
https://forum.lede-project.org/t/lenovo-iomega-ez-media-backup-center/5031/ # "Lenovo Iomega EZ Media & Backup Center"
https://forum.doozan.com/read.php?2,35331,35434#msg-35434 # "Lenovo iomega EZ support" but read entire thread if it is possible
https://forum.doozan.com/read.php?2,15887 # "Debian on Iomega EZ Media & Backup Center" this is another thread about
https://forum.doozan.com/read.php?2,12096 # "Linux Kernel 4.14.1 Kirkwood package and Debian rootfs" Kernel and rootfs, thanks to this it is possible to run Debian
# Newer kernel guide:
https://gist.github.com/koczaj/a20ed52c969a8d0612986ca576067876
# Using a Debian box (it could be a VM) with the harddrive connected (it could be a minimal net-install Debian)
See ip with:
ip addr show
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active Jul 13, 2020
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
View dumb-ap-wired-link.sh
@braian87b
braian87b / wireless-link-bonding.sh
Last active Jun 20, 2020
Linux Interface Bonding on Wireless Link (OpenWrt / LEDE)
View wireless-link-bonding.sh
@braian87b
braian87b / relayd-igmpproxy.sh
Last active Jun 18, 2020
How to setup Client Bridged / Client Mode / RelayD and IGMPProxy for OpenWRT / LEDE
View relayd-igmpproxy.sh
# Client Bridged / Client Mode / RelayD and IGMPProxy (It works)
# RelayD is to redirect packages and IGMP is for redirect IGMP packages
# Our network is 192.168.1.0/24
# Steps:
# Configure WAN as static
# We should edit our wan iface and put static IP
uci set network.wan='interface'
uci set network.wan.proto='static'
uci set network.wan.ipaddr='192.168.1.239' # Main Network IP
@braian87b
braian87b / mwan3-notes.md
Last active Jun 13, 2020
How to get MWAN3 Working Properly on OpenWRT / LEDE
View mwan3-notes.md

In experience to get a proper working multiple wan configuration using mwan3 starting from scratch you should:

Important: this works well on OpenWRT 15.05.1, on newer versions there was some breaking changes, for example, the wan ifaces have ipv6 capability and now are named with letters ("wan, wanb... , wanc" instead of "wan, wan2... wan3" so wanb6 means 2nd wan ipv6.): https://github.com/openwrt/packages/blob/master/net/mwan3/files/etc/config/mwan3

The official documentation seems to be very detailed and up to date, I recommend reading those first: https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3 but I recommend to give a look at my config file below, since my approach for policyes is very nice.

First of all: Activate conntrack, docs says that is important and neccesary to get MWAN3 work properly, and it is needed to reboot:

@braian87b
braian87b / additional-vlan3-for-wan2.sh
Last active May 9, 2020
Additional VLAN 3 for WAN2 on tl-wr1043nd-v2, tl-wdr3600-v1 and tl-wdr4300-v1 OpenWRT / LEDE
View additional-vlan3-for-wan2.sh
# This is done by luci (it just sets defaults and assigns an ID to each vlan entry)
uci set network.@switch[0].mirror_source_port='0'
uci set network.@switch[0].mirror_monitor_port='0'
uci set network.@switch_vlan[0].vid='1'
uci set network.@switch_vlan[1].vid='2'
# For tl-wr1043nd-v2:
# Switch, LAN (on tl-wr1043nd-v2 we must enable tagging on CPU port 0)
uci set network.@switch_vlan[0].ports='0t 1 2 3 4' # previously '0 1 2 3 4'
# Switch, WAN
@braian87b
braian87b / OpenWRT-LEDE-uci-defauls-TP-LINK-factory-SSID-KEY.sh
Last active May 2, 2020
OpenWRT - LEDE uci-defaults for TP-LINK Routers for default factory SSID and KEY
View OpenWRT-LEDE-uci-defauls-TP-LINK-factory-SSID-KEY.sh
@braian87b
braian87b / remove_dups_tmbackup.sh
Last active May 2, 2020
Convert TimeMachine backup into a Differential-like backup
View remove_dups_tmbackup.sh
#!/usr/bin/env bash
# thisfile: remove_dups_tmbackup.sh
# save the current path
CURRENT_DIR=$(pwd)
# receive backup destinarion directory as argument
DEST_DIR="$1"
# search for last previous destination directory name
@braian87b
braian87b / openwrt-lede-on-pc-vm.sh
Created Nov 22, 2017
Instruction to have OpenWRT or LEDE on a X86 PC or Virtual Machine
View openwrt-lede-on-pc-vm.sh
# ----------------------------------------------------------------------
# Instruction to have OpenWRT or LEDE on a X86 PC or Virtual Machine:
# ----------------------------------------------------------------------
# boot using DamnSmallLinux or similar:
sudo /etc/init.d/ssh start
# see IP to connect using ssh
ifconfig
# set a password for root
su
You can’t perform that action at this time.