diff --git a/files/app/main/status/e/network.ut b/files/app/main/status/e/network.ut
index 2f56604f..f32961ca 100755
--- a/files/app/main/status/e/network.ut
+++ b/files/app/main/status/e/network.ut
@@ -108,16 +108,11 @@ if (request.env.REQUEST_METHOD === "PUT") {
configuration.setSetting("dhcp_end", request.args.lan_dhcp_end);
}
}
- if ("wan_enable" in request.args) {
- if (request.args.wan_enable === "off") {
- configuration.setSetting("wan_proto", "disabled");
- }
- else {
- configuration.setSetting("wan_proto", "dhcp");
- }
- }
if ("wan_mode" in request.args) {
if (request.args.wan_mode === "0") {
+ configuration.setSetting("wan_proto", "disabled");
+ }
+ else if (request.args.wan_mode === "1") {
configuration.setSetting("wan_proto", "dhcp");
}
else {
@@ -299,63 +294,52 @@ const gateway_altnet = dmz_mode === 1 ? dhcp.gateway : "";
-
+
-
WAN Enable
-
Allow node to directly access the Internet
+
WAN Mode
+
Disabled, static or DHCP mode
- {{_R("hideable-switch", { name: "wan_enable", value: wan_proto === "disabled" ? false : true })}}
+
- {{_H("Enable the WAN interface on this node, to allow it to access the Internet directly.")}}
-
+ {{_H("The WAN interface can either use DHCP to retrieve an IP address, or it can be set statically.")}}
+
-
Mode
-
Static or DHCP mode
+
Address
+
WAN IP address
-
+
- {{_H("The WAN interface can either use DHCP to retrieve an IP address, or it can be set statically.")}}
-
-
-
-
Address
-
WAN IP address
-
-
-
-
+ {{_H("A fixed IP address to assign to the WAN interace on this node.")}}
+
+
- {{_H("A fixed IP address to assign to the WAN interace on this node.")}}
-
-
-
Netmask
-
WAN netmask
-
-
-
-
+
+
- {{_H("The netmask (e.g. 255.255.255.0) for this interface.")}}
-
-
-
Gateway
-
Default gateway
-
-
-
-
-
- {{_H("The default gateway his node should use to access the Internet.")}}
+ {{_H("The netmask (e.g. 255.255.255.0) for this interface.")}}
+
+
+
Gateway
+
Default gateway
+
+
+
+
+
+ {{_H("The default gateway his node should use to access the Internet.")}}
diff --git a/files/usr/local/bin/node-setup b/files/usr/local/bin/node-setup
index b43568cc..2f468213 100755
--- a/files/usr/local/bin/node-setup
+++ b/files/usr/local/bin/node-setup
@@ -237,7 +237,7 @@ end
-- delete some config lines if necessary
-if cfg.wan_proto == "dhcp" then
+if cfg.wan_proto ~= "static" then
deleteme.wan_ip = true
deleteme.wan_gw = true
deleteme.wan_mask = true