phpsysinfo / phpsysinfo

phpSysInfo: a customizable PHP script that displays information about your system nicely
http://phpsysinfo.github.io/phpsysinfo
GNU General Public License v2.0
1.39k stars 231 forks source link

Current connections #279

Closed black-cerberon closed 4 years ago

black-cerberon commented 4 years ago

Please add plugin for looking current network connectios with sorting by TCP/UDP/Incoming/Outcoming/etc.

namiltd commented 4 years ago

Some examples please. I don't quite understand what that would be.

black-cerberon commented 4 years ago

Something like netstat.

namiltd commented 4 years ago

Try using the iptables plugin. Change class.iptables.inc.php line 50:

               if (CommonFunctions::executeProgram('iptables-save', "", $lines) && !empty($lines))

to

               if (CommonFunctions::executeProgram('netstat', "-an", $lines) && !empty($lines))

or something like that.

namiltd commented 4 years ago

Added: https://github.com/phpsysinfo/phpsysinfo/commit/c5d2d25259b7e7b41836627550cece3d41f389ba Try now https://github.com/phpsysinfo/phpsysinfo/archive/master.zip

PLUGINS="viewer"

[viewer]
ACCESS="command"
COMMAND="netstat"
PARAMS="-ant"