diff --git a/luciexpress/htdocs/plugins/internet/pages/internet.exposed_host.html b/luciexpress/htdocs/plugins/internet/pages/internet.exposed_host.html index 513a1f692..cc7367558 100644 --- a/luciexpress/htdocs/plugins/internet/pages/internet.exposed_host.html +++ b/luciexpress/htdocs/plugins/internet/pages/internet.exposed_host.html @@ -1,42 +1,30 @@
-

Exposed Host

-

If you have a local network device that cannot run an Internet application properly behind the firewall, you can allow unrestricted Internet access to the network device (Exposed Host).

-
-
- Exposed Host Function -
-
-
-
-
-
-

Warning: By using the exposed host function you bypass the firewall of your {{config.friendly_name}}. Please make sure that your computer is protected against attacks from Internet. The following ports will not be forwarded: {{ nonforwardedPorts || 'None'}}.

-
- -
-
-
-
Plublic IP Address
-
{{ wan.ip }}
-
-
-
Local IP Address
-
- -
-
+ + + {{'Exposed Host'|translate}} + {{'internet.exposed_host.info'|translate}} + + + + + + + +
+

Warning: By using the exposed host function you bypass the firewall of your {{config.friendly_name}}. Please make sure that your computer is protected against attacks from Internet. The following ports will not be forwarded: {{ nonforwardedPorts || 'None'}}.

- -
-
{{ info_message }}
-
{{ error_message }}
- -
+

Choose the local IP address that should be exposed to Internet. Additionally you should configure this IP address as static DHCP address for your device (see Settings/Network).

+ + + {{wan.ip}} + + + + + + + +
diff --git a/luciexpress/htdocs/plugins/internet/pages/internet.exposed_host.js b/luciexpress/htdocs/plugins/internet/pages/internet.exposed_host.js index a4fc40d43..154d687e9 100644 --- a/luciexpress/htdocs/plugins/internet/pages/internet.exposed_host.js +++ b/luciexpress/htdocs/plugins/internet/pages/internet.exposed_host.js @@ -5,19 +5,20 @@ $juci.module("internet") $scope.lan = {}; $scope.config = $config; - function load(){ - $uci.show("firewall.dmz").done(function(dmz){ - $scope.dmz = dmz; - $scope.exposedHostEnabled = Number(dmz.enabled); - $scope.$apply(); - }); - } load(); - - $rpc.network.interface.status({ - "interface": "wan" - }).done(function(wan){ - $scope.wan.ip = wan["ipv4-address"][0].address; - }); + async.parallel([ + function(next){ + $uci.sync("firewall").done(function(){ + $scope.firewall = $uci.firewall; + }).always(function(){ next(); }); + }, + function(next){ + $rpc.network.interface.status({ + "interface": "wan" + }).done(function(wan){ + $scope.wan.ip = wan["ipv4-address"][0].address; + }).always(function(){ next(); }); + } + ]); $scope.onEnable = function(en){ $scope.dmz.enabled = $scope.exposedHostEnabled;