Skip to content

Commit ee39be5

Browse files
authored
Update README.md
1 parent 6c107f3 commit ee39be5

File tree

1 file changed

+68
-23
lines changed

1 file changed

+68
-23
lines changed

README.md

Lines changed: 68 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,96 +6,141 @@
66
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)
77
# Table of Contents
88
* [Introduction to x86routertools](#whatis)
9+
910
* [Using the command line tools](#cmdline)
11+
1012
* [Using the daemon](#daemon)
13+
1114
* [System requirements](#sysreq)
15+
1216
* [Installation](#install)
17+
1318
* [Configuration options](#cfgopt)
19+
1420
* [Scripts and examples](#scripts)
21+
1522
## <a name="whatis"></a>Introduction to x86routertools
16-
This is a command line toolkit written in Bash that aims to turn a regular x86_64 computer running GNU/Linux into a wireless router or access point (AP), whilst managing things like system services, alerts, system LEDs and making sure the network is always up via watchdog daemons.
23+
**This is a command line toolkit written in Bash that aims to turn a regular x86_64 computer running GNU/Linux into a wireless router or access point (AP), whilst managing things like system services, alerts, system LEDs and making sure the network is always up via watchdog daemons.**
1724

1825
Similar in nature to create_ap, this goes a bit further with the configurability of the whole program and the scope. It can do:
1926
* Watch and restart wireless APs when needed, with per-AP configuration and simple masquerading/fowarding rules.
27+
2028
* Watch and restart the internet-facing interface when needed via user-made scripts (x86routertools takes care of 'detecting' connectivity)
29+
2130
* Network status logging and status alerts to desktop/console/LED
31+
2232
* Automatically restart a service 'stack' on network initialization, for DNS sinkholing setups for example.
33+
2334
* Manage queue disciplines with CAKE SQM and pre-defined categories
35+
2436
* Manage ath9k Wi-Fi cards' special features, like digital predistortion and ack timeout estimation.
37+
2538
* Manage generic Wi-Fi AP features, like power saving, retransmission, regulatory domains and transmit power.
39+
2640
* Optimize the network stack, for example, toggling on BBRv2/v1 if present.
41+
2742
* Offer command line tools for wireless AP management and debugging.
2843

29-
x86routertools is currently not compatible with NetworkManager, but a patch to set predefined interfaces as 'unmanaged' to fix this should be easy to make.
3044

3145
## <a name="cmdline"></a>Using the command line tools
3246
x86routertools comes with many verbs that can be used to get information on the system.
3347

34-
For example, you can check what MCS rates your phone is using on the connection, to measure the quality of the service it is getting:
48+
For example, you can check what MCS rates your client is using on the connection, to measure the quality of the service it is getting:
3549
* Get the MAC address of the device by looking at the list of connected devices:
36-
* `$ routertools ls`
50+
* -`$ routertools ls`
3751
* Then, you can pull up the real-time rate display with the AP's interface name:
38-
* `$ routertools display-rates wlan0 aa:bb:cc:dd:ee:ff`
52+
* -`$ routertools display-rates wlan0 aa:bb:cc:dd:ee:ff`
3953

4054
You can also toggle many runtime options of a wireless interface. For example, to turn on LNA mixing on ath9k cards (the daemon can do this for you, too):
41-
* `# routertools lnamix-on wlan0`
55+
* -`# routertools lnamix-on wlan0`
4256
* Or, to set it on all APs on the system:
43-
* `# routertools lnamix-on`
57+
* -`# routertools lnamix-on`
4458

45-
Calling `routertools --help` should be enough to get you a full, descriptive list of commands.
59+
**Calling `routertools --help` should be enough to get you a full, descriptive list of commands.**
4660

4761
## <a name="daemon"></a>Using the daemon
48-
The x86routertools daemon has two instances, Wi-Fi and internet, which are independent from each other.
62+
**The x86routertools daemon has two instances, Wi-Fi and internet, which are independent from each other.**
4963

50-
Their function is to watch the system-wide SQM/qdisc configuration, and watch the AP interfaces and the internet-facing interface respectively. How they work and what they do is extensively configurable via files in `/etc/routertools.d/`. The most important of them, containing the most options, is arguably `x86routertools.conf`.
64+
Their function is to watch the system-wide SQM/qdisc configuration, and watch the AP interfaces and the internet-facing interface respectively. How they work and what they do is extensively configurable via files in `/etc/routertools.d/`.
65+
66+
**The most important of them, containing the most options, is arguably `x86routertools.conf`.**
67+
68+
**To start the internet daemon, you can use:**
5169

52-
To start the internet daemon, you can use:
5370
`sudo systemctl start routertoolsd-inet`
5471

55-
To start the wireless AP daemon:
56-
`sudo systemctl start routertoolsd-wifi@wlan0`
72+
**To start the wireless AP daemon:**
73+
74+
`sudo systemctl start routertoolsd-wifi@wlan0`
75+
5776
Where, of course, wlan0 is the name of one interface you configured in `/etc/routertools.d/wifi-access-points`.
5877

59-
The daemons will regularly output their status to the system log, send desktop notifications, or make a light blink somewhere.
78+
**The daemons will regularly output their status to the system log, send desktop/tty notifications, or make a light blink somewhere.**
6079

6180
## <a name="sysreq"></a>System requirements
6281
* Access point-capable Wi-Fi card (ath9k is preferred but optional)
6382

6483
Must be installed:
6584
* systemd
85+
6686
* netstat
87+
6788
* iw
89+
6890
* ifconfig
91+
6992
* iptables
93+
7094
* hostapd
7195

96+
Incompatible:
97+
* NetworkManager
98+
7299
Optional:
73100
* wget, for grabbing hostapd configuration reference.
101+
74102
* haveged or rngd, without, WPA/WEP performance may suffer
103+
75104
* A firewall like ufw, shorewall or firewalld. x86routertools *will not block any vulnerable ports for you*!
105+
76106
* A DHCP server like Pi-hole or dnsmasq, otherwise your clients will not be able to use DHCP. x86routertools *will not configure DNS for you*!
107+
77108
## <a name="install"></a>Installation
78109
x86routertools is normally installed to `/usr/bin`. Other necessary directories like in `/etc` will be populated by the program on first run.
79110

80111
To install it on your system:
112+
81113
* Clone the repository somewhere:
82-
* `$ git clone https://github.com/yagoplx/x86routertools.git`
83-
* `$ cd x86routertools`
114+
* -`$ git clone https://github.com/yagoplx/x86routertools.git`
115+
* -`$ cd x86routertools`
84116
* Run make install:
85-
* `# make install`
117+
* -`# make install`
86118

87119
You may also want to run a `systemctl daemon-reload` if you want to try out the daemon right away.
88120

89-
Configuration is well documented and required, check the new files at `/etc/routertools.d` for examples and info. For example, to register a new wireless interface with x86routertools, you will want to set up them at `/etc/routertools.d/wifi-access-points`.
121+
**Configuration is well documented and required, check the new files at** `/etc/routertools.d` **for examples and info.**
122+
123+
**For example, to register a new wireless interface with x86routertools, you will want to set up them at** `/etc/routertools.d/wifi-access-points`.
124+
125+
**Each wireless interface should have two files in there: a interface.conf, and a interface_hostapd.conf.**
126+
127+
Example files with all possible options documented are provided for you to copy/rename.
128+
129+
**As for the internet facing interface, you should set up scripts to set them up and down at** `/etc/routertools.d/scripts`.
130+
131+
The default is to just call the Arch Linux pppoe-start and pppoe-stop commands for PPPoE, in this case the internet interface is ppp0.
132+
133+
**The daemon will call the stop script when it restarts the interface, and then the start script. The command line tools also can use these scripts as well.**
134+
135+
**If necessary, you should include configuration for other interfaces on the start script, for example, making a 6to4 tunnel or a bridge interface, setting addresses/routes for them via ip/iptables, etc.**
90136

91-
Each wireless interface should have two files in there: a interfacename.conf, and a interfacename_hostapd.conf. Example files with all possible options documented are provided for you to copy/rename.
137+
In the scripts folder you can also add start-interfacename/stop-interfacename files for your access point interfaces.
92138

93-
As for the internet facing interface, you should set up scripts to set them up and down at `/etc/routertools.d/scripts`. The default is to just call the Arch Linux pppoe-start and pppoe-stop commands for PPPoE, in this case the internet interface is ppp0. The daemon will call the stop script when it restarts the interface, and then the start script. The command line tools also can use these scripts as well. If necessary, you should include configuration for other interfaces on the start script, for example, making a 6to4 tunnel or a bridge interface, setting addresses/routes for them via ip/iptables, etc.
94-
In the scripts folder you can also add start-interfacename/stop-interfacename files for your access point interfaces. This is useful for additional routing/address work if the included functionality in x86routertools isn't enough (eg. IPv6).
139+
This is useful for additional routing/address work if the included functionality in x86routertools isn't enough (eg. IPv6).
95140

96141
You can have the daemon start on boot for the standard wifi router experience:
97-
* `# systemctl enable routertoolsd-inet`
98-
* `# systemctl enable routertoolsd-wifi@interface_name`
142+
* -`# systemctl enable routertoolsd-inet`
143+
* -`# systemctl enable routertoolsd-wifi@interface_name`
99144

100145
#### <a name="cfgopt"></a>Configuration options
101146
Configuration is system-wide and is done via files in `/etc/routertools.d`

0 commit comments

Comments
 (0)