All Projects → oofnikj → Docker Openwrt

oofnikj / Docker Openwrt

Licence: gpl-2.0
OpenWrt running in Docker

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Openwrt

Openwrt Rpi
Raspberry Pi & NanoPi R2S/R4S & G-Dock & x86 OpenWrt Compile Project. (Based on Github Action / Daily Update)
Stars: ✭ 3,492 (+3163.55%)
Mutual labels:  raspberry-pi, openwrt
TG799VAC-XTREME-17.2-MINT
My personal unique wiki for hacking the router firmware used by (Telia)TG799vac Xtream v17.2-MINT delivered from Technicolor
Stars: ✭ 71 (-33.64%)
Mutual labels:  router, openwrt
openwrt
OpenWrt Stable 1907 with lean's package
Stars: ✭ 55 (-48.6%)
Mutual labels:  router, openwrt
Ansible Openwisp2 Imagegenerator
Automatically build several openwisp2 firmware images for different organizations while keeping track of their differences
Stars: ✭ 122 (+14.02%)
Mutual labels:  router, openwrt
Xunlei Fastdick
迅雷快鸟 Xunlei Network Accelerator For Router
Stars: ✭ 789 (+637.38%)
Mutual labels:  router, openwrt
Luci Wrtbwmon
Bandwidth tracker for OpenWRT that uses wrtbwmon
Stars: ✭ 201 (+87.85%)
Mutual labels:  router, openwrt
slim-wrt
Armor for Openwrt
Stars: ✭ 66 (-38.32%)
Mutual labels:  router, openwrt
Familycloudspeederinshell
[ 天翼家庭云/天翼云盘提速 Shell 版 ] A Shell Implementation of FamilyCloudSpeeder, ESurfing
Stars: ✭ 154 (+43.93%)
Mutual labels:  router, openwrt
Openmptcprouter
OpenMPTCProuter is an open source solution to aggregate multiple internet connections using Multipath TCP (MPTCP) on OpenWrt
Stars: ✭ 652 (+509.35%)
Mutual labels:  raspberry-pi, openwrt
Openwrtinvasion
Root shell exploit for several Xiaomi routers: 4A Gigabit, 4A 100M, 4, 4C, 3Gv2, 4Q, miWifi 3C...
Stars: ✭ 366 (+242.06%)
Mutual labels:  router, openwrt
YAWAC
Yet Another Wifi Auto Connect (YAWAC) is a shell script to connect to a dataset of wireless connection and free hotspot like FreeWifi. It's works on OpenWrt.
Stars: ✭ 22 (-79.44%)
Mutual labels:  router, openwrt
Fast Path Lede Openwrt
PLEASE GO TO NEW OPENWRT TRUNK BASED SFE FIRMWARE ->
Stars: ✭ 96 (-10.28%)
Mutual labels:  router, openwrt
Asuswrt Merlin Transparent Proxy
transparent proxy base on ss, v2ray, ipset, iptables, chinadns on asuswrt merlin.
Stars: ✭ 367 (+242.99%)
Mutual labels:  router, openwrt
Actions Openwrt K2p
Use Github Actions to automatically compile Lean's Modified Lede source for K2P
Stars: ✭ 67 (-37.38%)
Mutual labels:  router, openwrt
Xunleikuainiaoinshell
[ 迅雷快鸟 Shell 版 ] A Shell Implementation of Kuainiao, Xunlei
Stars: ✭ 102 (-4.67%)
Mutual labels:  router, openwrt
Overlayroot
mounts an overlay file system over root
Stars: ✭ 104 (-2.8%)
Mutual labels:  raspberry-pi
Pi Hole Droid
Pi-hole Droid is an unofficial app that connects to your Pi-hole to show charts and statistics.
Stars: ✭ 107 (+0%)
Mutual labels:  raspberry-pi
App Release
An IoT Solution,this is the android release app | download ios app in app store
Stars: ✭ 104 (-2.8%)
Mutual labels:  raspberry-pi
Spokestack Python
Spokestack is a library that allows a user to easily incorporate a voice interface into any Python application.
Stars: ✭ 103 (-3.74%)
Mutual labels:  raspberry-pi
Gin
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
Stars: ✭ 53,971 (+50340.19%)
Mutual labels:  router

OpenWrt in Docker

pipeline status

Inspired by other projects that run hostapd in a Docker container. This goes one step further and boots a full network OS intended for embedded devices called OpenWrt, so you can manage all aspects of your network from a user-friendly web UI.

For Raspberry Pi-specific instructions, see Building on Raspberry Pi.

Dependencies

  • docker
  • iw
  • iproute2
  • envsubst (part of gettext or gettext-base package)
  • dhcpcd

Build

Pre-built images are available on Docker Hub at oofnik/openwrt. Alternatively, build the image yourself using the make build target:

$ make build

If you want additional OpenWrt packages to be present in the base image, add them to the Dockerfile. Otherwise you can install them with opkg after bringing up the container.

A searchable package list is available on openwrt.org.

Configure

Initial configuration is performed using a config file, openwrt.conf. Values read from this file at runtime are used to generate OpenWrt format config files from templates in etc/config/*.tpl.

You can use the included openwrt.conf.example as a baseline, which explains the values.

It is also possible to make persistent changes in the UI and download a backup of your full router configuration by navigating to System > Backup / Flash Firmware and clicking Backup.

Run

Prepare your openwrt.conf file as explained above and execute the make run target:

$ make run

If you arrive at * Ready, point your browser to http://openwrt.home (or whatever you set in LAN_DOMAIN) and you should be presented with the login page. The default login is root with the password set as ROOT_PW.

To shut down the router, press Ctrl+C. Any settings you configured or additional packages you installed will persist until you run make clean, which will delete the container.

Install / Uninstall

$ make install

Install and uninstall targets for systemd have been included in the Makefile.

Installing will create and enable a service pointing to wherever you cloned this directory and execute run.sh on boot.

Cleanup

$ make clean

This will delete the container and all associated Docker networks so you can start fresh if you screw something up.


Notes

Hairpinning

In order for WLAN clients to see one another, OpenWrt bridges all interfaces in the LAN zone and sets hairpin mode (aka reflective relay) on the WLAN interface, meaning packets arriving on that interface can be 'reflected' back out through the same interface.

run.sh tries to handle this if WIFI_HAIRPIN is set to true, and prints a warning if it fails. Hairpin mode may not be needed in all cases, but if you experience an issue where Wi-Fi clients are unable to see each other despite AP isolation being disabled, this may fix it.

Network namespace

For hostapd running inside the container to have access to the physical wireless device, we need to set the device's network namespace to the PID of the running container. This causes the interface to 'disappear' from the primary network namespace for the duration of the container's parent process. run.sh checks if the host is using NetworkManager to manage the wifi interface, and tries to steal it away if so.

Addtional Docker services

Additional containers that are run alongside OpenWrt on the same physical host are directly accessible on the LAN. No port forwarding to the host is necessary. It's recommended to add static hostnames to be able to resolve local services on your LAN.

See Monitoring with InfluxDB + Grafana for example.

Upgrading

Read the upgrade guide.


Troubleshooting

Logs are redirected to stdout so the Docker daemon can process them. They are accessible with:

$ docker logs ${CONTAINER} [-f]

As an alternative to installing debug packages inside your router, it's possible to execute commands available to the host inside the network namespace. A symlink is created in /var/run/netns/<container_name> for convenience:

$ sudo ip netns exec ${CONTAINER} tcpdump -vvi any 

OpenVPN Howto

Bandwidth Monitoring Howto

Monitoring with InfluxDB + Grafana

IPv6 Notes

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].