You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: high_availability.rst
+77-75Lines changed: 77 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,11 @@ Some key concepts to understand before setting up HA:
26
26
- **Virtual IP (VIP)**: A shared IP address used by both nodes for each configured interface to ensure uninterrupted client access to services.
27
27
Clients on the network should *always* use the VIP address (e.g., as their gateway, DNS server, or VPN endpoint) to ensure seamless failover.
28
28
29
-
Configuration changes must **always** be made on the **primary node**. The backup node should be considered read-only.
30
-
Most configurations, such as firewall rules, VPN settings, or Threat Shield rules, are automatically synchronized from the primary to the backup node.
29
+
Configuration changes must **always** be made on the **primary node**.
30
+
The backup node should be considered read-only. The only exception is the network configuration of
31
+
LAN interfaces that are part of the HA cluster.
32
+
33
+
All other relevant configurations, such as firewall rules, VPN settings, or Threat Shield rules, are automatically synchronized from the primary to the backup node.
31
34
32
35
This is how the HA system works:
33
36
@@ -46,14 +49,11 @@ This is how the HA system works:
46
49
it deactivates most services and connections.
47
50
48
51
While the HA system is designed to be as automatic as possible, some configurations require manual intervention.
49
-
For example, if you add a new network interface or change an existing one, you need to inform the HA system about these changes.
50
-
Specific actions are needed to ensure the backup node is aware of the new network configuration:
52
+
For example, if you add a new LAN network interface or change an existing one, you need to inform the HA system about these changes.
51
53
52
-
- Beside the first LAN and WAN configured in the initial setup, all other interfaces must be explicitly added to the HA cluster.
53
-
This is done using the ``ns-ha-config add-lan-interface`` or ``ns-ha-config add-wan-interface`` command.
54
-
This command registers the new interface in the HA cluster configuration and associates a Virtual IP (VIP) with it for failover.
55
-
- Similarly, when adding an IP alias to an interface on the primary node, you must also register this alias within the HA cluster configuration
56
-
using ``ns-ha-config add-alias``.
54
+
Beside the first LAN configured in the initial setup, all other LAN interfaces must be explicitly added to the HA cluster.
55
+
This is done using the ``ns-ha-config add-lan-interface`` or ``ns-ha-config add-wan-interface`` command.
56
+
This command registers the new interface in the HA cluster configuration and associates a Virtual IP (VIP) with it for failover.
57
57
58
58
Supported features and limitations
59
59
===================================
@@ -80,13 +80,22 @@ The HA cluster supports synchronization for a wide range of features, including:
80
80
- Active connections tracking (conntrackd)
81
81
- Hotspot (dedalo)
82
82
83
+
The HA cluster supports the following WAN interface types and setups:
84
+
85
+
- Static IPv4 and static IPv6 addresses
86
+
- IPv4 via DHCP
87
+
- Physical Ethernet interfaces
88
+
- Bonded interfaces (link aggregation) composed of physical interfaces
89
+
- Bridge interfaces over physical interfaces
90
+
- VLANs on physical interfaces, bond interfaces, or bridge interfaces
91
+
- PPPoE on physical interfaces or on VLAN interfaces
92
+
83
93
Be aware of the following current limitations:
84
94
85
-
- IPv4 only (IPv6 is not supported).
86
-
- VLANs are supported only on physical interfaces.
95
+
- Only IPv4 is supported on LAN interfaces
87
96
- Extra packages such as NUT are not supported.
88
97
- Syslog daemon (rsyslog) configuration is not synced: if you need to send logs to a remote server, you must use the controller.
89
-
- PPPoE or DHCP WAN is not supported (see Static IP requirement)
98
+
90
99
91
100
Also note that after the first synchronization, the backup node will have the same hostname as the primary node.
92
101
The web user interface will show the hostname of the primary node, but the dashboard will indicate the node's role (primary or backup).
@@ -100,7 +109,8 @@ Before setting up HA, ensure the following requirements are met:
100
109
101
110
- Two firewalls with identical network devices. Each device must have the exact same name and numbering (e.g., eth0, eth1, eth2, eth3)
102
111
- Both nodes must be connected to the same LAN; connect the LAN interfaces to the same broadcast domain (usually the same switch).
103
-
- Static IP addresses for all interfaces that will host a virtual IP.
112
+
- Static IP addresses for all LAN interfaces that will host a virtual IP.
113
+
- Primary LAN interface must be named ``lan`` in both firewalls
104
114
105
115
Setup and configuration
106
116
========================
@@ -127,28 +137,28 @@ The setup process is as follows:
127
137
otherwise the node may enter a fault state and the HA cluster will not work properly.
128
138
See `Cluster initialization`_ section below for detailed instructions.
129
139
130
-
5. **Add WAN interface** to cluster configuration to ensure proper failover for internet connectivity.
131
-
This step is crucial for maintaining internet access during failover scenarios.
132
-
See `WAN Interfaces`_ section below for detailed instructions.
140
+
5. **Configure WAN interface in primary node** using the ``Interfaces and devices`` page in the web interface.
141
+
WAN interfaces will be automatically configured inside the cluster and synchronized to the backup node.
142
+
See `WAN Interfaces`_ section below for more info.
133
143
134
144
6. **Verify the configuration** to ensure everything is set up correctly.
135
145
Use the `ns-ha-config` commands to check the status and configuration of the HA cluster.
136
146
See `Verify the configuration`_ section below for detailed instructions.
137
147
138
-
7. **Configure additional interfaces** for the cluster as needed (optional).
139
-
This step is optional and depends on your network setup. You can add any additional interfaces that require HA support.
148
+
7. **Configure additional LAN interfaces (optional)** for the cluster.
149
+
This step is optional and depends on your network setup. You can add any additional LAN interface that require HA support.
140
150
See `Additional interfaces`_ section below for detailed instructions.
141
151
If you need to configure an hotspot, see `Hotspot support`_ section below for specific requirements.
142
152
143
-
8. **Add IP aliases** to the primary node on relevant interfaces (optional).
153
+
8. **Add extra Virtual IPs (optional)** to the primary node on relevant LAN interfaces.
144
154
This step is optional and allows you to add additional IP addresses to the primary node for services that require multiple IPs.
145
-
See `Network aliases`_ section below for detailed instructions.
155
+
See `Extra Virtual IPs`_ section below for detailed instructions.
146
156
147
157
The detailed steps for each of these points are covered in the sections below.
148
158
149
159
Sometimes, you may need to remove interfaces or aliases from the HA configuration.
150
160
This can be done using the `ns-ha-config` commands.
151
-
See `Remove interfaces and aliases`_ section below for detailed instructions.
161
+
See `Remove interfaces and virtual IPs`_ section below for detailed instructions.
Where the ``primary_node_ip`` is the static IP of the primary node already set for the LAN interface,
257
258
and ``backup_node_ip`` is the static LAN IP of the backup node
258
259
The ``virtual_ip`` is the virtual IP address for the LAN interface where all LAN hosts should point to.
259
-
The ``lan_interface`` parameter is optional and specifies the LAN interface name (default is `lan`).
260
260
261
261
This script will:
262
262
@@ -265,7 +265,7 @@ This script will:
265
265
- Generate a random password and public key for synchronization.
266
266
- Configure `dropbear` (SSH server) to listen on port `65022` and allow only key-based authentication for sync.
267
267
268
-
Initialize the backup node (always execute the command on the primary node)::
268
+
Initialize the backup node, always execute the command on the primary node::
269
269
270
270
ns-ha-config init-backup-node
271
271
@@ -278,16 +278,17 @@ At this point, the nodes are configured to communicate over LAN, and the LAN vir
278
278
WAN interfaces
279
279
--------------
280
280
281
-
The WAN interface is the first interface to be added to the HA cluster.
282
-
Remember that the WAN interface must be configured with a static IP address, so make sure also to setup :ref:`DNS forwarders <forwarding_servers-section>`.
281
+
The system does not require any special configuration for the WAN interfaces.
282
+
Just configure them inside the `Interfaces and devices` page and they will be automatically managed
283
+
by the HA scripts.
283
284
284
-
Configure the WAN interface::
285
+
WAN aliases can be added from the "Interfaces and devices" page and will be automatically synchronized to
0 commit comments