Giter Site home page Giter Site logo

openwrt-wac's Introduction

Intro

WAC is a simple command line tool for managing groups of openwrt based rotuers.

Features

  • show system status (ip, load, mem, uptime) of all devices
  • show wireless interface status (ssid, txpower, channel) all devices
  • ban client by mac address
  • change wireless settings (ssid, encryption, channel
  • management devices by user-defined groups

Installation

Install from pypi,

pip install openwrt-wac

Install from source,

git clone https://github.com/jianingy/openwrt-wac.git
cd openwrt-wac
python ./setup.py install

Basic Usage

Users can define their own groups by putting files into groups directory. Names of the files will be used as groupnames. Each file should contain ip address or domains of openwrt devices. Here is an example,

192.168.100.202
192.168.100.203
192.168.100.204
192.168.100.207

After defined groups, you can use its name for various operations.

List all access points,

$ wac ap-list @soho2

name, host, #clients, loadavg, mem, uptime
CORP-SOHO-AP-1, 192.168.100.207, 35, 0.00 / 0.00 / 0.00, 104.3 MB / 128.9 MB, a month ago
CORP-SOHO-AP-13, 192.168.100.203, 54, 0.00 / 0.00 / 0.00, 103.9 MB / 128.9 MB, a month ago
CORP-SOHO-AP-14, 192.168.100.202, 68, 0.00 / 0.00 / 0.00, 100.2 MB / 128.9 MB, 29 days ago
CORP-SOHO-AP-18, 192.168.100.204, 47, 0.00 / 0.00 / 0.00, 103.4 MB / 128.9 MB, a month ago

List all wlan interfaces,

$ wac wlan-list @soho2
name, host, radio, wlan, ssid, enc, status, hwmode, htmode, txpower, channel
CORP-SOHO-AP-1, 192.168.100.207, radio0, wlan0, daling, psk2, up, 11g, HT40, 24, 11
CORP-SOHO-AP-1, 192.168.100.207, radio1, wlan1, daling-5g, psk2, up, 11a, HT20, 24, 36
CORP-SOHO-AP-13, 192.168.100.203, radio0, wlan0, daling, psk2, up, 11g, HT40, 24, 9
CORP-SOHO-AP-13, 192.168.100.203, radio1, wlan1, daling-5g, psk2, up, 11a, HT20, 24, 153
CORP-SOHO-AP-14, 192.168.100.202, radio0, wlan0, daling, psk2, up, 11g, HT40, 24, 11
CORP-SOHO-AP-14, 192.168.100.202, radio1, wlan1, daling-5g, psk2, up, 11a, HT20, 24, 149
CORP-SOHO-AP-18, 192.168.100.204, radio0, wlan0, daling, psk2, up, 11g, HT40, 24, 7
CORP-SOHO-AP-18, 192.168.100.204, radio1, wlan1, daling-5g, psk2, up, 11a, HT20, 24, 149

Change a wlan setting by its address,

wac wlan-edit --wlan-id 0 --channel 1 192.168.100.203
wac wlan-edit --wlan-id 0 --ssid 'public-wifi' 192.168.100.203
wac wlan-edit --wlan-id 0 --encryption 'psk2:password' 192.168.100.203

Ban a client by its mac address,

wac client-ban 192.168.100.203 --wlan-id 1 --mac bc:4c:c4:ff:ff:ff

Remove a client from ban list,

wac client-permit 192.168.100.203 --wlan-id 1 --mac bc:4c:c4:ff:ff:ff

License

   Copyright 2016, Jianing Yang

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

openwrt-wac's People

Contributors

jianingy avatar

Stargazers

Nestor Wheelock avatar liy avatar Jonas Anton Östman avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

darcyg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.