Files
literate-dotfiles/router.org
2024-01-29 11:28:50 +01:00

269 lines
9.5 KiB
Org Mode

#+TITLE: Open-WRT Router (Netgear R7800)
#+SETUPFILE: ./setup/org-setup-file.org
* Installation
** Freebox - Bridge mode
https://blog.kulakowski.fr/post/openwrt-derriere-une-freebox-ipv6-dmz-et-bridge
** Enable SSL
How can I enable SSL for the web admin gui?
In an SSH-command line, run =opkg update=, then install the package =opkg install luci-ssl=, then restart the router. Then you can access https://192.168.1.1 or https://openwrt with your favorite web browser
** Install useful packages
Not sure all of that is needed.
#+begin_src bash
opkg update && opkg install luci-ssl-openssl ipset curl diffutils speedtest-netperf kmod-ipt-nat6
#+end_src
Nice theme:
https://github.com/jerrykuku/luci-theme-argon
* Update
This might not be a good idea.
#+begin_src matlab
opkg update
#+end_src
#+begin_src bash
opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade
#+end_src
** Installed package (before upgrade)
#+begin_quote
ath10k-firmware-qca9984-ct - 2020-07-02-1
base-files - 204.2-r11306-c4a6851c72
busybox - 1.30.1-6
ca-bundle - 20200601-1
cgi-io - 2021-09-08-98cef9dd-20
curl - 7.66.0-3
diffutils - 3.7-2
dnsmasq - 2.80-16.3
dropbear - 2019.78-2
etherwake - 1.09-4
firewall - 2019-11-22-8174814a-3
fstools - 2020-05-12-84269037-1
fwtool - 2
getrandom - 2019-06-16-4df34a4d-4
hostapd-common - 2019-08-08-ca8c2bd2-8
ip6tables - 1.8.3-1
iperf3 - 3.7-1
ipset - 7.3-1
iptables - 1.8.3-1
iw - 5.0.1-1
iwinfo - 2019-10-16-07315b6f-1
jshn - 2020-05-25-66195aee-1
jsonfilter - 2018-02-04-c7e938d6-1
kernel - 4.14.221-1-0894164cab0effc42201a29fec8ce33f
kmod-ata-ahci - 4.14.221-1
kmod-ata-ahci-platform - 4.14.221-1
kmod-ata-core - 4.14.221-1
kmod-ath - 4.14.221+4.19.161-1-1
kmod-ath10k-ct - 4.14.221+2019-09-09-5e8cd86f-1
kmod-cfg80211 - 4.14.221+4.19.161-1-1
kmod-gpio-button-hotplug - 4.14.221-3
kmod-hwmon-core - 4.14.221-1
kmod-ip6tables - 4.14.221-1
kmod-ipt-conntrack - 4.14.221-1
kmod-ipt-core - 4.14.221-1
kmod-ipt-ipset - 4.14.221-1
kmod-ipt-nat - 4.14.221-1
kmod-ipt-nat6 - 4.14.221-1
kmod-ipt-offload - 4.14.221-1
kmod-leds-gpio - 4.14.221-1
kmod-lib-crc-ccitt - 4.14.221-1
kmod-mac80211 - 4.14.221+4.19.161-1-1
kmod-nf-conntrack - 4.14.221-1
kmod-nf-conntrack6 - 4.14.221-1
kmod-nf-flow - 4.14.221-1
kmod-nf-ipt - 4.14.221-1
kmod-nf-ipt6 - 4.14.221-1
kmod-nf-nat - 4.14.221-1
kmod-nf-nat6 - 4.14.221-1
kmod-nf-reject - 4.14.221-1
kmod-nf-reject6 - 4.14.221-1
kmod-nfnetlink - 4.14.221-1
kmod-nls-base - 4.14.221-1
kmod-ppp - 4.14.221-1
kmod-pppoe - 4.14.221-1
kmod-pppox - 4.14.221-1
kmod-scsi-core - 4.14.221-1
kmod-slhc - 4.14.221-1
kmod-usb-core - 4.14.221-1
kmod-usb-dwc3 - 4.14.221-1
kmod-usb-dwc3-of-simple - 4.14.221-1
kmod-usb-ehci - 4.14.221-1
kmod-usb-ledtrig-usbport - 4.14.221-1
kmod-usb-ohci - 4.14.221-1
kmod-usb-phy-qcom-dwc3 - 4.14.221-1
kmod-usb2 - 4.14.221-1
kmod-usb3 - 4.14.221-1
libblobmsg-json - 2020-05-25-66195aee-1
libc - 1.1.24-2
libcurl4 - 7.66.0-3
libgcc1 - 7.5.0-2
libip4tc2 - 1.8.3-1
libip6tc2 - 1.8.3-1
libipset13 - 7.3-1
libiwinfo-lua - 2019-10-16-07315b6f-1
libiwinfo20181126 - 2019-10-16-07315b6f-1
libjson-c2 - 0.12.1-3.1
libjson-script - 2020-05-25-66195aee-1
liblua5.1.5 - 5.1.5-3
liblucihttp-lua - 2019-07-05-a34a17d5-1
liblucihttp0 - 2019-07-05-a34a17d5-1
libmbedtls12 - 2.16.12-1
libmnl0 - 1.0.4-2
libnl-tiny - 0.1-5
libopenssl1.1 - 1.1.1n-1
libpthread - 1.1.24-2
libubox20191228 - 2020-05-25-66195aee-1
libubus-lua - 2022-02-21-b32a0e17-1
libubus20191227 - 2019-12-27-041c9d1c-1
libubus20210603 - 2022-02-21-b32a0e17-1
libuci20130104 - 2019-09-01-415f9e48-4
libuclient20160123 - 2020-06-17-51e16ebf-1
libustream-mbedtls20150806 - 2020-03-13-40b563b1-1
libxtables12 - 1.8.3-1
logd - 2019-06-16-4df34a4d-4
lua - 5.1.5-3
luci - git-22.115.68448-712bc8e-1
luci-app-firewall - git-22.115.68448-712bc8e-1
luci-app-opkg - git-22.115.68448-712bc8e-1
luci-base - git-22.115.68448-712bc8e-1
luci-compat - git-22.115.68448-712bc8e-1
luci-lib-ip - git-22.115.68448-712bc8e-1
luci-lib-ipkg - git-22.115.68448-712bc8e-1
luci-lib-jsonc - git-22.115.68448-712bc8e-1
luci-lib-nixio - git-22.115.68448-712bc8e-1
luci-mod-admin-full - git-22.115.68448-712bc8e-1
luci-mod-network - git-22.115.68448-712bc8e-1
luci-mod-status - git-22.115.68448-712bc8e-1
luci-mod-system - git-22.115.68448-712bc8e-1
luci-proto-ipv6 - git-22.115.68448-712bc8e-1
luci-proto-ppp - git-22.115.68448-712bc8e-1
luci-ssl - git-22.115.68448-712bc8e-1
luci-theme-argon-master - 2.2.9.4
luci-theme-bootstrap - git-22.115.68448-712bc8e-1
luci-theme-material - git-22.115.68448-712bc8e-1
mtd - 24
netifd - 2021-01-09-753c351b-1
netperf - 2.7.0-1
odhcp6c - 2021-01-09-64e1b4e7-16
odhcpd-ipv6only - 2020-05-03-49e4949c-3
openwrt-keyring - 2021-02-20-49283916-2
opkg - 2021-01-31-c5dccea9-1
perl - 5.28.1-4
perlbase-base - 5.28.1-4
perlbase-bytes - 5.28.1-4
perlbase-class - 5.28.1-4
perlbase-config - 5.28.1-4
perlbase-dynaloader - 5.28.1-4
perlbase-errno - 5.28.1-4
perlbase-essential - 5.28.1-4
perlbase-fcntl - 5.28.1-4
perlbase-filehandle - 5.28.1-4
perlbase-getopt - 5.28.1-4
perlbase-io - 5.28.1-4
perlbase-list - 5.28.1-4
perlbase-net - 5.28.1-4
perlbase-posix - 5.28.1-4
perlbase-scalar - 5.28.1-4
perlbase-selectsaver - 5.28.1-4
perlbase-socket - 5.28.1-4
perlbase-symbol - 5.28.1-4
perlbase-tie - 5.28.1-4
perlbase-time - 5.28.1-4
perlbase-xsloader - 5.28.1-4
ppp - 2.4.7.git-2019-05-25-3
ppp-mod-pppoe - 2.4.7.git-2019-05-25-3
procd - 2020-03-07-09b9bd82-1
px5g-mbedtls - 9
rpcd - 2020-05-26-67c8a3fd-1
rpcd-mod-file - 2020-05-26-67c8a3fd-1
rpcd-mod-iwinfo - 2020-05-26-67c8a3fd-1
rpcd-mod-luci - 20201107
rpcd-mod-rrdns - 20170710
speedtest-netperf - 1.0.0-1
swconfig - 12
ubi-utils - 2.1.1-1
uboot-envtools - 2018.03-3.1
ubox - 2019-06-16-4df34a4d-4
ubus - 2022-02-21-b32a0e17-1
ubusd - 2022-02-21-b32a0e17-1
uci - 2019-09-01-415f9e48-4
uclibcxx - 0.2.5-3
uclient-fetch - 2020-06-17-51e16ebf-1
uhttpd - 2020-10-01-3abcc891-1
umdns - 2020-04-25-cdac0460-1
urandom-seed - 1.0-1
urngd - 2020-01-21-c7f7b6b6-1
usign - 2020-05-23-f1f65026-1
wakeonlan - 0.41-1
wireless-regdb - 2021.08.28-1
wpad-basic - 2019-08-08-ca8c2bd2-8
#+end_quote
* Configuration
** Configuration Files
https://openwrt.org/docs/guide-user/base-system/uci#common_principles
Configuration files are in =/etc/config=.
| *File* | *Description* |
|------------------------+------------------------------------------------|
| =/etc/config/dhcp= | Dnsmasq and odhcpd settings: DNS, DHCP, DHCPv6 |
| =/etc/config/dropbear= | SSH server options |
| =/etc/config/firewall= | NAT, packet filter, port forwarding, etc. |
| =/etc/config/network= | Switch, interface and route configuration: |
| =/etc/config/system= | Misc. system settings, NTP, RNG, Watchcat |
| =/etc/config/wireless= | Wireless settings and wifi network definition |
** VLAN
| ID | Name | Description |
|----+-----------+-------------|
| 1 | LAN | |
| 2 | WAN | |
| 3 | GUEST | |
| 4 | IOT | |
| 5 | Unifi-LAN | |
** TODO IP Addresses
*** LAN
| Hostname | MAC-Address | IPv4-Address | Description |
|-----------------+-------------------+---------------+-------------|
| xps13 | 94:05:BB:13:6E:55 | 192.168.1.71 | |
| desktop-w10 | 14:DA:E9:D5:9D:F4 | 192.168.1.72 | |
| smart-tv | 5C:85:7E:45:F9:82 | 192.168.1.73 | |
| unifi-u6-lite-1 | 70:A7:41:C6:BE:60 | 192.168.1.74 | |
|-----------------+-------------------+---------------+-------------|
| homelab | D4:5D:64:7C:38:3C | 192.168.1.21 | |
|-----------------+-------------------+---------------+-------------|
| oneplus8 | 5A:C7:3D:21:DE:D7 | 192.168.1.101 | |
|-----------------+-------------------+---------------+-------------|
| valetudo | 7C:25:DA:37:A5:BC | 192.168.1.110 | |
*** IOT
| Hostname | MAC-Address | IPv4-Address | Description |
|-------------------------------+-------------------+--------------+-------------|
| http://shutter-1.lan/ | C4:5B:BE:5F:C8:32 | 192.168.2.10 | Shutters |
| http://shutter-2.lan/ | C4:5B:BE:5F:3A:E2 | 192.168.2.11 | |
| http://shutter-3.lan/ | C4:5B:BE:5F:35:41 | 192.168.2.12 | |
| http://shutter-salon.lan/ | 48:3F:DA:49:24:01 | 192.168.2.13 | (ESP8266) |
|-------------------------------+-------------------+--------------+-------------|
| http://shelly1-1.lan/ | E8:68:E7:86:C1:2C | 192.168.2.20 | Light-bulbs |
| http://shelly1-2.lan/ | E8:68:E7:87:46:51 | 192.168.2.21 | |
| http://shelly1-3.lan/ | 8C:AA:B5:74:CD:16 | 192.168.2.22 | |
| http://shelly1-salon.lan/ | E8:68:E7:87:27:1D | 192.168.2.24 | |
| http://shelly25-cuisine.lan/ | 98:CD:AC:1E:11:8E | 192.168.2.25 | |
| http://shelly25-entrance.lan/ | C4:5B:BE:6B:87:39 | 192.168.2.26 | |
|-------------------------------+-------------------+--------------+-------------|
| http://xiaomi-ble.lan/ | 3C:61:05:12:A8:C4 | 192.168.2.28 | Temperature |
|-------------------------------+-------------------+--------------+-------------|
| http://shellytrv-1.lan/ | BC:33:AC:03:35:8C | 192.168.2.40 | TRV |
| http://shellytrv-2.lan/ | 60:A4:23:DC:C7:1E | 192.168.2.41 | |
| http://shellytrv-3.lan/ | 60:A4:23:DC:C8:14 | 192.168.2.42 | |
| http://shellytrv-s.lan/ | 60:A4:23:DB:2B:76 | 192.168.2.43 | |
| http://shellytrv-e.lan/ | 60:A4:23:DB:2C:8C | 192.168.2.44 | |