-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME
44 lines (40 loc) · 1.89 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
NetGWM stands for Network Gateway Manager
(http://flant.ru/projects/netgwm)
NetGWM is a tool on Python used for automatically switching
network gateway when your current ISP goes offline.
How to deploy NetGWM?
0) Install prerequisites:
- iproute2
- conntrack (http://conntrack-tools.netfilter.org/)
- python-yaml (http://pyyaml.org/)
1) Execute "make install". It will create /usr/lib/netgwm
with netgwm.py and /etc/netgwm with configs and samples.
2) Using simple YAML configuration file (samples/netgwm.yml),
you should define your gateways (by IPs or devices) and
their priorities. In /etc/default/netgwm, you can change
the period of checking gateways (by default, every 60 sec).
3) Add new routing table named "netgwm_check" to your iproute
configuration file (/etc/iproute2/rt_tables; there is
an example at samples/rt_tables.sample). It's done
automatically in the Debian package.
4) Use /etc/init.d/netgwm to launch NetGWM.
That's all! NetGWM will ping given addresses through your
current gateway to check your Internet connection. If all
of these addresses are down, NetGWM will switch your current
gateway to a working one (with a highest priority).
Other features:
* A gateway is considered as working only after N seconds
of successfull checks. This setting ("min_uptime") can be
configured in netgwm.yml.
* When a gateway with a higher priority goes back online
NetGWM will automatically switch to it from the current
one.
* Every time NetGWM switches a network gateway, it will
execute all the scripts placed in
/etc/netgwm/post-replace.d (for more details, please have
a look at samples/post-replace.d/script.sh).
* NetGWM can maintain the full list of gateways statuses
continually for your special needs (e.g. to be used in
other software). This data is stored in
/var/run/netgwm/gwstore.yml. This setting
("check_all_gateways") can be enabled in netgwm.yml.