Skip to content

Instantly share code, notes, and snippets.

View braian87b's full-sized avatar

braian87b

View GitHub Profile
@braian87b
braian87b / wrtbwmon-instructions.txt
Last active August 29, 2017 10:43
Instructions to get properly working wrtbwmon from https://github.com/pyrovski/wrtbwmon
# Instructions to get properly working wrtbwmon from https://github.com/pyrovski/wrtbwmon
# More info on: https://wiki.openwrt.org/doc/howto/wrtbwmon
# Remove previous package if present
root@OpenWrt:~# opkg remove wrtbwmon
root@OpenWrt:~# cd /tmp
# Download (search for latest ipk url on https://github.com/pyrovski/wrtbwmon/releases/)
root@OpenWrt:/tmp# wget https://github.com/pyrovski/wrtbwmon/releases/download/0.32/wrtbwmon_0.32_all.ipk
Connecting to github.com (192.30.252.131:443)
Connecting to github-cloud.s3.amazonaws.com (54.231.9.169:443)
@braian87b
braian87b / testing extroot pogoplug.sh
Last active March 7, 2017 02:23
Testing ext-root rootfs on SD Card for PogoPlug Mobile
# This commands executed on OpenWrt on 128mb internal Flash on a PogoPlug Mobile
# Yet something is missing to make it work, but I think I am close
# Install some stuff
opkg install usbutils
opkg install fdisk
opkg install kmod-usb-storage block-mount kmod-fs-ext4
opkg install e2fsprogs
# List Partitions on SD
@braian87b
braian87b / mwan-config.sh
Last active June 30, 2023 12:53
/etc/config/mwan
# My documentation:
#
# 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
#
# We have Interfaces, Members, Policyes y Rules:
#
# Interfaces: Allows to identify the wan interface, we just need to have it enabled`
# the others parameters are only to track if the interface it is up or down.
#
# Members: Can be defined in some metric and weight, both values will be important ambos when used in policyes.
@braian87b
braian87b / mwan3-notes.md
Last active October 22, 2023 12:33
How to get MWAN3 Working Properly on OpenWRT / LEDE

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 / relayd-igmpproxy.sh
Last active October 22, 2023 12:32
How to setup Client Bridged / Client Mode / RelayD and IGMPProxy for OpenWRT / LEDE
# 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 / additional-vlan3-for-wan2.sh
Last active October 22, 2023 13:24
Additional VLAN 3 for WAN2 on tl-wr1043nd-v2, tl-wdr3600-v1 and tl-wdr4300-v1 OpenWRT / LEDE
# 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 / wireless-link-wds.sh
Last active January 7, 2024 19:31
How to setup Wireless Links to avoid Wired backbone using WDS on Atheros for OpenWRT / LEDE
@braian87b
braian87b / dumb-ap-wired-link.sh
Last active March 30, 2024 20:21
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@braian87b
braian87b / routed-client.sh
Last active August 7, 2017 00:16
How to setup Routed Client for OpenWRT / LEDE
Refer to image: https://forum.lede-project.org/t/help-to-create-2-wifi-networks-in-the-same-router/3320/6
Instrucciones en español: https://gist.github.com/braian87b/2333a32577a221c8d62b5ce8b54a4d95
# Delete existing wireless interfaces:
uci del wireless.@wifi-iface[-1]
uci del wireless.@wifi-iface[-1]
uci del wireless.@wifi-iface[-1]
# Important, to avoid conflicts with phisical WAN port (you will not be using it, if you want to use it too you had to use MWAN3)
@braian87b
braian87b / cliente-enrutado.sh
Last active August 7, 2017 00:16
Como configurar Cliente Enrutado para OpenWRT / LEDE
Ver imagen: https://forum.lede-project.org/t/help-to-create-2-wifi-networks-in-the-same-router/3320/6
English instructions: https://gist.github.com/braian87b/2333a32577a221c8d62b5ce8b54a4d95
Si tu Router es el de la izquierda del grafico:
# Borras interfaces wifi que tengas:
uci del wireless.@wifi-iface[-1]
uci del wireless.@wifi-iface[-1]
uci del wireless.@wifi-iface[-1]