Search and filtering in connections.cgi

Hi all,
inspired by Core 188 WUI changes - #15 by ms have made some changes in connections.cgi (under “Status” in WUI) and am searching for some critics, testings, enhancements and of course for constructive feedback.

The following has been enhanced →

The main changes are

  • Added zone filter to select network zones (LAN, INTERNET, DMZ, etc.) via clickable legend.
  • Included NAT IPs in filtering for all zones.
  • Added search function to filter connections by IP, port, or protocol. With jQuery toggle on/off for search section.
  • Display filter status showing active filters and connection count.
    Have tested so far LAN, INTERNET, WIRELESS and IPFire (also in combination) legend tabs which worked so far some tests might be nice for the other parts according to the zones filtering. Have also tested the search filter which worked so far too, IP addresse can also be filtered by one, two, three or specific four octets.

If someone wants to check it, in here git.ipfire.org Git - people/ummeegge/ipfire-2.x.git/commit all can be found.
To integrate it, you can use the blob/raw format and !!!Please do not forget to backup the existing connection.cgi!!!

Feel free to give it a try and give some feedback.

Paralell project:
currently a little hacky!!! It should deliver configurable refresh cycles, configrable via WUI, and as before above cklicable zone filtering, search by IP, port and protocol is possible too.

or for a fast overview Index of /~ummeegge/connections

If someone … :slight_smile: in here you can find all → git.ipfire.org Git - people/ummeegge/ipfire-2.x.git/commit

Best,

Erik

EDIT(s) - Git address wil always be updated in here:

  • 07.05.25 Fixes and enhancements
  • Fix multi-pattern search to use AND logic
  • Corrected search filter to apply AND instead of OR for IP, port, and protocol criteria.
  • Added case-insensitive protocol matching and input sanitization for robustness.
  • Added ipcolour cache and pre-filtered networks.
  • Replaced external sort with Perl sorting for conntrack table.
  • Removed redundant close(CONNTRACK) call.

09-05-2025:

  • Added parallel project for refresh intervals and a new get_table.cgi
5 Likes

Hi @siosios, you are one the right track since both should be (not that far) combined with another (realtime with a new graphical solution) but please use another channel for this since this is here currently OT.

Thanks and best,

Erik

1 Like

@ummeegge
we are very happy with your solution :trophy:
regression countered :bullseye:
:mechanical_arm: :technologist:

no drawbacks found so far :detective:

Thank you for the flowers,
which version do/did you use for the testings ?

Best,

Erik

youre welcome :folded_hands:
the commit:
https://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h=29ea599c07065e8a041f12ab9dec01a1bb5e7be0
including the get_table.cgi is in action here.

report:
connections.cgi?search_enabled=on&ip=&port=&protocol=tcp&refresh_interval=2
is working here non-stop for five days now :mechanical_arm:

1 Like