Last active
January 28, 2025 13:38
-
-
Save RustyRouter/3869713d7645608f1f7394812f11e931 to your computer and use it in GitHub Desktop.
OpenWrt router into a dumb Access Point.
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
#!/bin/ash | |
# ======================================================== | |
# Setup a Dumb AP for OpenWRT | |
# Tested on: Belkin RT3200 (aka. Linksys E8450) 22.03.3 | |
# Script expects factory settings | |
# Copy the script file to your /tmp folder with SCP | |
# SSH your router | |
# Type sh /tmp/dumb_ap.sh | |
# ======================================================== | |
# Disable IPv6 | |
# ======================================================== | |
uci del dhcp.lan.ra | |
uci del dhcp.lan.dhcpv6 | |
uci del network.lan.ip6assign | |
uci set network.lan.delegate='0' | |
uci set network.cfg030f15.ipv6='0' | |
uci del network.globals.ula_prefix | |
uci del dhcp.odhcpd | |
/etc/init.d/odhcpd disable | |
/etc/init.d/odhcpd stop | |
uci commit | |
# ======================================================== | |
# Disable Dnsmasq completely and discard dhcp | |
uci commit dhcp; echo '' > /etc/config/dhcp | |
/etc/init.d/dnsmasq disable | |
/etc/init.d/dnsmasq stop | |
# ======================================================== | |
# Disable firewall | |
/etc/init.d/firewall disable | |
/etc/init.d/firewall stop | |
# ======================================================== | |
# Remove WAN logical interfaces | |
uci del network.wan | |
uci del network.wan6 | |
# ======================================================== | |
# To identify better when connected to SSH and when seen on the network | |
uci set system.@system[0].hostname='DumbAP' | |
uci set network.lan.hostname="`uci get system.@system[0].hostname`" | |
uci commit system | |
# ======================================================== | |
# Set static network configuration (sample config for 192.168.1.0/24) | |
# 192.168.1.1 is the Main Router | |
# ======================================================== | |
uci set network.lan.ipaddr='192.168.1.2' | |
uci set network.lan.dns='192.168.1.1' | |
uci set network.lan.gateway='192.168.1.1' | |
uci set network.lan.netmask='255.255.255.0' | |
uci set network.lan.broadcast='192.168.1.255' | |
uci commit network | |
echo '=====================================================================' | |
echo 'Reboot your router' | |
echo 'you can now connect the LAN port of this device to the LAN port' | |
echo 'of your main router.' | |
echo '192.168.1.2 is now your Access Point IP Address' | |
echo '=====================================================================' | |
sync | |
reboot |
Thanks! Does this work on 23.05.2?
You’re welcome, yes it does
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! Does this work on 23.05.2?