diff --git a/luci-mod-admin-full/luasrc/controller/admin/network.lua b/luci-mod-admin-full/luasrc/controller/admin/network.lua
index aa86c184e..d07316f06 100644
--- a/luci-mod-admin-full/luasrc/controller/admin/network.lua
+++ b/luci-mod-admin-full/luasrc/controller/admin/network.lua
@@ -158,6 +158,12 @@ function index()
page = entry({"admin", "network", "diag_speedtest"}, post("diag_speedtest"), nil)
page.leaf = true
+
+ page = entry({"admin", "network", "diag_getip"}, post("diag_getip"), nil)
+ page.leaf = true
+
+ page = entry({"admin", "network", "diag_netstat"}, post("diag_netstat"), nil)
+ page.leaf = true
-- end
end
@@ -438,6 +444,14 @@ function diag_iperf3(addr)
diag_command("iperf3 -c %q 2>&1", addr)
end
+function diag_getip(addr)
+ diag_command("curl %q", addr)
+end
+
+function diag_netstat(addr)
+ diag_command("netstat -lapute 2>&1", "openmptcprouter.com")
+end
+
function diag_speedtest(addr)
if addr then
diag_command("speedtestc --server %q 2>&1", addr)
diff --git a/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm b/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
index 6243b536c..9596578bb 100644
--- a/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
+++ b/luci-mod-admin-full/luasrc/view/admin_network/diagnostics.htm
@@ -11,11 +11,14 @@ local has_ping6 = fs.access("/bin/ping6") or fs.access("/usr/bin/ping6")
local has_traceroute6 = fs.access("/usr/bin/traceroute6")
local has_speedtest = fs.access("/usr/sbin/speedtestc")
local has_iperf3 = fs.access("/usr/bin/iperf3")
+local has_curl = fs.access("/usr/bin/curl")
+local has_netstat = fs.access("/bin/netstat")
local dns_host = luci.config.diag and luci.config.diag.dns or "dev.openwrt.org"
local ping_host = luci.config.diag and luci.config.diag.ping or "dev.openwrt.org"
local route_host = luci.config.diag and luci.config.diag.route or "dev.openwrt.org"
local iperf3_host = luci.config.diag and luci.config.diag.iperf3 or "ping-ams1.online.net"
+local getip_host = luci.config.diag and luci.config.diag.getip or "ifconfig.co"
%>
@@ -69,7 +72,7 @@ local iperf3_host = luci.config.diag and luci.config.diag.iperf3 or "ping-ams1.o
-