Last active
August 15, 2024 14:08
-
-
Save dianariyanto/c21a594388f9c47d0edb3766ba83e9a7 to your computer and use it in GitHub Desktop.
Run openwrt router using docker :D
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -ti -p 80:80 --name openwrt --net=host --cap-add NET_ADMIN --privileged -v /home/naufal/Docker/Data/openwrt:/data openwrtorg/rootfs:armvirt-64-19.07.7 | |
docker run --rm -ti -p 80:80 --name openwrt --net=conf-vlan11 --privileged -v /home/naufal/Docker/Data/openwrt:/data openwrtorg/rootfs:armvirt-64-19.07.7 | |
docker run --rm -ti -p 80:80 --name openwrt --net=OpenWrt-LAN --cap-add NET_ADMIN --privileged -v /home/naufal/Docker/Data/openwrt:/data openwrtorg/rootfs:armvirt-64-19.07.7 | |
# https://hub.docker.com/r/raiuka/openwrt_on_docker | |
docker network create -d macvlan --subnet=192.0.0.0/24 --gateway=192.0.0.254 --ipv6 --subnet=fe80::/16 --gateway=fe80::1 -o parent=vlan11 -o macvlan_mode=bridge openwrt-LAN | |
docker network create -d macvlan --subnet=192.168.0.0/24 --gateway=192.168.0.254 --ipv6 --subnet=fe82::/16 --gateway=fe82::1 -o parent=wlan0 -o macvlan_mode=bridge openwrt-WAN | |
docker run -it -d --restart=always --network=openwrt-LAN --privileged --name=openwrt --cap-add=NET_ADMIN openwrtorg/rootfs:armvirt-64-19.07.7 | |
config interface 'lan' | |
option type 'bridge' | |
option ifname 'eth0' | |
option proto 'static' | |
option ipaddr '192.0.0.1' | |
option netmask '255.255.255.0' | |
option ip6assign '64' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -it --name mysql -p 3306:3306 -v $(pwd):/app -e MYSQL_DATABASE=radius -e MYSQL_USER=radius -e MYSQL_PASSWORD=radpass -e MYSQL_ROOT_PASSWORD=radpass wangxian/alpine-mysql | |
docker run --name freeradius -d -p 1812:1812/udp -p 1813:1813/udp -p 80:80 -e CLIENT_SECRET=radsec123 -e CLIENT_NET=0.0.0.0/0 -e RADIUS_DB_SERVER=localhost -e RADIUS_DB_USER=radius -e RADIUS_DB_PWD=radpass asdaru/freeradius-mysql-daloradius | |
version: 2 | |
services: | |
radiusdesk: | |
image: drummerroma/radiusdesk:latest | |
depends_on: | |
- mysql | |
container_name: radiusdesk | |
ports: | |
- 8888:80 | |
volumes: | |
- $PWD/Docker/Data/radiusdesk:/var/www/ | |
links: | |
- mysql | |
mysql: | |
image: drummerroma/mysqlradius | |
container_name: mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: rd | |
MYSQL_USER: rd | |
MYSQL_PASSWORD: rd | |
ports: | |
- 3306:3306 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment