Skip to content

Instantly share code, notes, and snippets.

@sclaret
Last active May 6, 2023 22:10
Show Gist options
  • Save sclaret/20e66bafb9e13a68072c9d390f9fd7f3 to your computer and use it in GitHub Desktop.
Save sclaret/20e66bafb9e13a68072c9d390f9fd7f3 to your computer and use it in GitHub Desktop.
OpenWrt v21.02.0 AP

Access Point

https://openwrt.org/docs/guide-user/network/wifi/dumbap

https://openwrt.org/docs/guide-user/network/vlan/switch

https://openwrt.org/docs/guide-user/network/wifi/vlan-multiple-wifi-ssid-repeater

Flash OpenWRT partition

https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset#reset_button

Connect Laptop to AP lan port 

http://192.168.1.1

System -> Backup / Flash Firmware -> Flash New Firmware Image 

openwrt-22.03.5-ramips-mt7621-dlink_dir-867-a1-squashfs-sysupgrade.bin

Configure OpenWRT

http://192.168.1.1

System —> System Timezone: Americas / Toronto

ssh root@192.168.1.1

passwd

cat /etc/config/network

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

uci set network.lan.ipaddr=192.168.1.2
uci set network.lan.gateway=192.168.1.1
uci set network.lan.dns=192.168.1.1
uci commit

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.1.2'
	option gateway '192.168.1.1'
	option dns '192.168.1.1'

service network restart

ssh root@192.168.1.2

cat /etc/config/wireless

config wifi-device 'radio1'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
	option channel '36'
	option band '5g'
	option htmode 'VHT80'
	option disabled '1'

uci set wireless.radio1.country=CA
uci set wireless.radio1.disabled=0
uci set wireless.radio1.txpower=24
uci set wireless.radio1.channel=44
uci set wireless.radio1.htmode=VHT80
uci set wireless.default_radio1.ieee80211r=1
uci set wireless.default_radio1.ft_psk_generate_local=1
uci set wireless.default_radio1.encryption=psk2
uci set wireless.default_radio1.ssid=
uci set wireless.default_radio1.key=
uci commit

config wifi-device 'radio1'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
	option band '5g'
	option htmode 'VHT80'
	option country 'CA'
	option disabled '0'
	option txpower '24'
	option channel '44'
config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ieee80211r '1'
	option ft_psk_generate_local '1'
	option encryption 'psk2'
	option ssid '#'
	option key '#'

service dnsmasq stop
service dnsmasq disable
service odhcpd disable
service odhcpd stop

iw reg get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment