From 01f718043c5cbdb7d1a9cf79c33bf37c80589bb9 Mon Sep 17 00:00:00 2001 From: robotpanic Date: Tue, 10 Aug 2021 18:48:24 +0300 Subject: [PATCH] update for 2021 --- Rakefile | 9 +- configurations.yml | 176 ++------------------- files/all/etc/rc.local | 4 +- files/archer-c5v1/etc/config/system | 44 ++++++ files/archer-c5v1/etc/config/wifi-sentinel | 6 + files/archer-c5v1/etc/config/wireless | 54 +++++++ prepwifi.sh | 2 +- 7 files changed, 123 insertions(+), 172 deletions(-) create mode 100644 files/archer-c5v1/etc/config/system create mode 100644 files/archer-c5v1/etc/config/wifi-sentinel create mode 100644 files/archer-c5v1/etc/config/wireless diff --git a/Rakefile b/Rakefile index 41b122f..3e80385 100644 --- a/Rakefile +++ b/Rakefile @@ -57,13 +57,8 @@ task :ap, [:name] do |t, args| end task :all do - aps = %W(ap-cf-f-l ap-cf-f-r ap-cf-srv) # Foaier - aps += %W(ap-cf-a1 ap-cf-a2 ap-cf-b1 ap-cf-c1) # Rooms - aps += %W(ap-cf-ch ap-cf-qws) # Chillout and quiet workshop area - - # Workshop floor - aps += %W(ap-ws-ws1 ap-ws-ws2) # workshop and overflow area - aps += %W(ap-ws-noc) # NOC/Team room + aps = %W(ap-wc ap-bar ap-stage) # Foaier + #aps += %W(ap-ws-noc) # NOC/Team room aps.each do |ap| Rake::Task["ap"].reenable diff --git a/configurations.yml b/configurations.yml index ac74a2c..689db32 100644 --- a/configurations.yml +++ b/configurations.yml @@ -4,46 +4,29 @@ # FLOOR = {00,11} # IP = last octet from 10.20.0.xx configurations: - # Foaier - ap-cf-srv: - config: archer-c7 - ip: 10.20.0.55 - wlans: - 0: - bssid: 0e:50:00:11:00:55 - channel: 157 - txpower: 22 - 1: - bssid: 0e:24:00:11:00:55 - channel: 12 - txpower: 10 - mixins: - - all - - archer-c5 - - archer-c5-single-trunk - ap-cf-f-l: + ap-wc: config: dap2965 - ip: 10.20.0.50 + ip: 10.20.0.22 wlans: 0: - bssid: 0e:50:00:11:00:50 - channel: 157 + bssid: 0e:50:00:11:00:52 + channel: 36 txpower: 22 1: - bssid: 0e:24:00:11:00:50 + bssid: 0e:24:00:11:00:52 channel: 12 txpower: 10 mixins: - all - dap2965 - dap2965-single-trunk - ap-cf-f-r: + ap-bar: config: dap2965 - ip: 10.20.0.51 + ip: 10.20.0.21 wlans: 0: bssid: 0e:50:00:11:00:51 - channel: 60 + channel: 52 txpower: 22 1: bssid: 0e:24:00:11:00:51 @@ -54,150 +37,19 @@ configurations: - dap2965 - dap2965-single-trunk # Main room - ap-cf-a1: - config: linksys - ip: 10.20.0.52 - wlans: - 0: - bssid: 0e:50:00:11:00:52 - channel: 157 - txpower: 22 - 1: - bssid: 0e:24:00:11:00:52 - channel: 6 - txpower: 10 - mixins: - - all - - linksys - - linksys-single-trunk - ap-cf-a2: - config: dap2965 - ip: 10.20.0.53 + ap-stage: + config: archer-c5 + ip: 10.20.0.23 wlans: 0: bssid: 0e:50:00:11:00:53 - channel: 44 - txpower: 22 - 1: - bssid: 0e:24:00:11:00:53 - channel: 12 - txpower: 10 - mixins: - - all - - dap2965 - - dap2965-single-trunk - ap-cf-b1: - config: archer-c5 - ip: 10.20.0.54 - wlans: - 0: - bssid: 0e:50:00:11:00:54 - channel: 60 - txpower: 22 - 1: - bssid: 0e:24:00:11:00:54 - channel: 12 - txpower: 10 - mixins: - - all - - archer-c5 - - archer-c5-single-trunk - ap-cf-c1: - config: dap2965 - ip: 10.20.0.56 - wlans: - 0: - bssid: 0e:50:00:11:00:56 - channel: 108 - txpower: 22 - 1: - bssid: 0e:24:00:11:00:56 - channel: 1 - txpower: 10 - mixins: - - all - - dap2965 - - dap2965-single-trunk - # Small room - ap-cf-qws: - config: archer-c5 - ip: 10.20.0.59 - wlans: - 0: - bssid: 0e:50:00:11:00:59 - channel: 108 - txpower: 22 - 1: - bssid: 0e:24:00:11:00:59 - channel: 1 - txpower: 10 - mixins: - - all - - archer-c5 - - archer-c5-single-trunk - ap-cf-ch: - config: linksys - ip: 10.20.0.58 - wlans: - 0: - bssid: 0e:50:00:11:00:58 - channel: 44 - txpower: 22 - 1: - bssid: 0e:24:00:11:00:58 - channel: 12 - txpower: 10 - mixins: - - all - - linksys - - linksys-single-trunk - # Workshops and overflow - ap-ws-ws1: - config: linksys - ip: 10.20.0.60 - wlans: - 0: - bssid: 0e:50:00:00:00:60 - channel: 44 - txpower: 22 - 1: - bssid: 0e:24:00:00:00:60 - channel: 1 - txpower: 6 - mixins: - - all - - linksys - - linksys-single-trunk - ap-ws-ws2: - config: linksys - ip: 10.20.0.61 - wlans: - 0: - bssid: 0e:50:00:00:00:61 channel: 157 txpower: 22 1: - bssid: 0e:24:00:00:00:61 - channel: 12 - txpower: 6 - mixins: - - all - - linksys - - linksys-single-trunk - # NOC/Team room - ap-ws-noc: - config: archer-c5 - ip: 10.20.0.62 - wlans: - 0: - bssid: 0e:50:00:00:00:62 - channel: 108 - txpower: 22 - 1: - bssid: 0e:24:00:00:00:62 - channel: 6 + bssid: 0e:24:00:11:00:53 + channel: 1 txpower: 10 mixins: - all - - archer-c5 + - archer-c5v1 - archer-c5-single-trunk diff --git a/files/all/etc/rc.local b/files/all/etc/rc.local index 9a5acb1..1370fdf 100644 --- a/files/all/etc/rc.local +++ b/files/all/etc/rc.local @@ -4,11 +4,11 @@ /usr/sbin/ebtables -A FORWARD -i wlan+ -o wlan+ -j DROP -for mac in 70:85:c2:a2:d2:16 2c:59:e5:73:c2:d0 2c:59:e5:73:c2:d4; do +for mac in a0:36:9f:01:fc:e4 70:85:c2:a2:d2:16 2c:59:e5:73:c2:d0 2c:59:e5:73:c2:d4; do /usr/sbin/ebtables -A FORWARD -i wlan+ -s ${mac} -j DROP done -for mac in 70:85:c2:a2:d2:16 2c:59:e5:73:c2:d0 2c:59:e5:73:c2:d4; do +for mac in a0:36:9f:01:fc:e4 70:85:c2:a2:d2:16 2c:59:e5:73:c2:d0 2c:59:e5:73:c2:d4; do /usr/sbin/ebtables -A FORWARD -i eth+ -o wlan+ -s ${mac} -j ACCEPT done diff --git a/files/archer-c5v1/etc/config/system b/files/archer-c5v1/etc/config/system new file mode 100644 index 0000000..64f6e7f --- /dev/null +++ b/files/archer-c5v1/etc/config/system @@ -0,0 +1,44 @@ + +config system + option hostname '' + option zonename 'Europe/Sofia' + option timezone 'EET-2EEST,M3.5.0/3,M10.5.0/4' + option log_ip '10.20.0.1' + option log_remote '1' + +config timeserver 'ntp' + list server '0.bg.pool.ntp.org' + list server '1.bg.pool.ntp.org' + list server '2.bg.pool.ntp.org' + list server '3.bg.pool.ntp.org' + option enabled '1' + option enable_server '0' + +config led 'led_usb1' + option name 'USB1' + option sysfs 'tp-link:green:usb1' + option trigger 'usbdev' + option dev '1-1' + option interval '50' + +config led 'led_usb2' + option name 'USB2' + option sysfs 'tp-link:green:usb2' + option trigger 'usbdev' + option dev '2-1' + option interval '50' + +config led 'led_wlan2g' + option name 'WLAN2G' + option sysfs 'tp-link:blue:wlan2g' + option trigger 'phy1tpt' + +config led 'led_wlan5g' + option name 'WLAN5G' + option sysfs 'tp-link:blue:wlan5g' + option trigger 'phy0tpt' + +config led 'led_system' + option name 'SYSTEM' + option sysfs 'tp-link:blue:system' + option trigger 'heartbeat' diff --git a/files/archer-c5v1/etc/config/wifi-sentinel b/files/archer-c5v1/etc/config/wifi-sentinel new file mode 100644 index 0000000..92d9030 --- /dev/null +++ b/files/archer-c5v1/etc/config/wifi-sentinel @@ -0,0 +1,6 @@ + +config wifi-sentinel + option packets 3 + option interval 10 + option network 'management' + option switchport '1' diff --git a/files/archer-c5v1/etc/config/wireless b/files/archer-c5v1/etc/config/wireless new file mode 100644 index 0000000..ce8bdb4 --- /dev/null +++ b/files/archer-c5v1/etc/config/wireless @@ -0,0 +1,54 @@ +config wifi-device radio0 + option type mac80211 + option hwmode 11a + option path 'pci0000:00/0000:00:00.0' + option channel + option txpower '' + option htmode VHT80 + option distance '20' + option require_mode 'n' + list basic_rate '54000' + list supported_rates '54000' + option log_level '-1' + option country 'BG' + option country_ie '1' + option doth '1' + +config wifi-iface + option device radio0 + option network 'wireless' + option mode 'ap' + option ssid 'OpenFest' + option encryption 'none' + option macaddr '' + option isolate '1' + option wnm_sleep_mode 1 + option proxy_arp 1 + +config wifi-device radio1 + option type mac80211 + option hwmode 11g + option path 'platform/ahb/18100000.wmac' + option channel + option txpower '' + option htmode 'HT20' + option distance '20' + list basic_rate '54000' + list supported_rates '54000' + option require_mode 'g' + option beacon_int 250 + option log_level '-1' + option country 'BG' + option country_ie '1' + +config wifi-iface + option device radio1 + option network 'wireless' + option mode 'ap' + option ssid 'OpenFest' + option encryption 'none' + option macaddr '' + option isolate '1' + option wnm_sleep_mode 1 + option proxy_arp 1 + diff --git a/prepwifi.sh b/prepwifi.sh index 1acf648..2b36d64 100644 --- a/prepwifi.sh +++ b/prepwifi.sh @@ -27,4 +27,4 @@ while ! fping ${newip}; do sleep 5; done ssh-keygen -R ${newip} sleep 3 -ssh -o stricthostkeychecking=no root@${newip} "opkg remove wpad-mini; opkg remove wpad; opkg update && opkg install ebtables tcpdump bc iftop hostapd-openssl collectd collectd-mod-iwinfo collectd-mod-interface collectd-mod-cpu collectd-mod-exec collectd-mod-load collectd-mod-memory collectd-mod-network && reboot" +ssh -o stricthostkeychecking=no root@${newip} "opkg remove wpad-mini; opkg remove wpad;opkg remove wpad-basic; opkg update && opkg install ebtables tcpdump bc iftop hostapd-openssl collectd collectd-mod-iwinfo collectd-mod-interface collectd-mod-cpu collectd-mod-exec collectd-mod-load collectd-mod-memory collectd-mod-network && reboot"