diff --git a/modules/luci-lua-runtime/luasrc/sys.lua b/modules/luci-lua-runtime/luasrc/sys.lua index e6eb762e48..2b6048e560 100644 --- a/modules/luci-lua-runtime/luasrc/sys.lua +++ b/modules/luci-lua-runtime/luasrc/sys.lua @@ -279,10 +279,14 @@ function net.host_hints(callback) end function net.conntrack(callback) - local ok, nfct = pcall(io.lines, "/proc/net/nf_conntrack") - if not ok or not nfct then + local ok, fd = pcall(io.open, "/proc/net/nf_conntrack") + if not ok or not fd then + ok, fd = pcall(io.popen, "/usr/sbin/conntrack -L -o extended", "r") + end + if not ok or not fd then return nil end + nfct = fd:lines() local line, connt = nil, (not callback) and { } for line in nfct do