Connection Monitor

Network → Bandix → Connections shows how many TCP and UDP connections each LAN device has open, broken down by TCP state, and lets you browse a device's individual connections (flows) with optional IP location information.

The data comes from the kernel's connection tracking table, read by the backend's connection module.

Enabling the Connection Monitor

The page works only when Enable Connection Monitoring is ticked on the Settings page (bandix.connections.enabled=1):

uci set bandix.connections.enabled='1'
uci commit bandix
/etc/init.d/bandix restart

Until then, the page shows Connection Monitor Disabled, "Please enable connection monitoring in settings" and a Go to Settings button. The RPC plugin itself also checks the option and returns "Connection monitoring is not enabled" from getConnection and getConnectionFlows.

Overview Cards

At the top, three cards show global counters:

Card Content
Total Connections All tracked connections (g.total)
TCP Connections TCP total (g.tcp), with ESTABLISHED (tcp_est), TIME_WAIT (tcp_tw) and CLOSE_WAIT (tcp_cw)
UDP Connections UDP total (g.udp)

A notice explains: "List only shows LAN device connections, data may differ from total connections." The global counters include every tracked connection, while the table below only covers LAN devices, so the per-device numbers do not necessarily add up to the totals.

Device Connection Statistics

Column Content
Device Hostname (falling back to IPv4, MAC, then "Unknown Device"), IPv4 and MAC
TCP Number of TCP connections
UDP Number of UDP connections
TCP Status Details EST (established), WAIT (TIME_WAIT), CLOSE (CLOSE_WAIT)
Total Connections Total for the device
Actions Details opens the device's flow list

The cards and the table refresh every second. On narrow screens the table becomes a list of cards with the same information.

Connection Details (Flows)

Click Details to open Connection Details – device. The dialog lists the device's connections one page at a time.

Filters and Paging

Control Options Where it applies
Protocol All, TCP, UDP Backend (new query)
State All, ESTABLISHED, SYN_SENT, SYN_RECV, FIN_WAIT, FIN_WAIT2, TIME_WAIT, CLOSE_WAIT, LAST_ACK, CLOSE Backend (new query)
Page size 50, 100 (default), 200, 500 Backend (new query)
Previous / Next Page through results Backend
Search Free text Browser, current page only
Show reply direction On by default Display only
Refresh Reload the current page Backend

The footer shows "Page n/total · Total: count". Changing a filter or the page size jumps back to page 1. Flows are requested by the device's IPv4 address, so the dialog only lists IPv4 connections of that device.

If a query fails, the table shows "Failed to load: error · Try using filters or smaller page size". Large flow lists can exceed the 15-second time limit the RPC plugin gives the backend.

Columns

Column Meaning
Protocol TCP or UDP
State Connection tracking state; ESTABLISHED, TIME_WAIT and CLOSE states are colored
Orig Src / Orig Dst Source and destination address and port in the original direction
Send Packets and bytes in the original direction, for example 42 pkts / 12.3 KiB
Repl Src / Repl Dst Addresses in the reply direction (after NAT)
Reply Packets and bytes in the reply direction
Flags Connection tracking flags, or -

Turning off Show reply direction hides the two reply address columns so that long IPv6 addresses fit on one line.

The flow query always asks the backend for location data (geoip=1). When the IP location database is enabled, address cells also show the location and network organization of public addresses (for example country, city and ASN), and special addresses are labeled (Local network, Private address, Loopback, Shared address (CGNAT), and so on).

Searching

The Search box filters the rows of the currently loaded page as you type. It does not query the backend. The footer adds "Matches on this page: n/m" while a search is active, and "No matching connections on this page" appears when nothing matches.

A row matches when every word of the search text appears somewhere in its searchable text. That text includes:

  • protocol, state and flags;
  • every source and destination address and port, also as address:port and, for IPv6, [address]:port;
  • for addresses with location data: the country code, organization, ASN (both 13335 and AS13335), country, region and city names in all languages the database provides, and the summary shown in the cell.

Matching ignores case and applies Unicode NFKC normalization, so full-width characters match their ASCII equivalents.

To search across all connections of a device, set the page size to 500 or narrow the list with the protocol and state filters first.

Typical Uses

  • Find what a device talks to: open Details, enable the IP location database, and search for a country name or an ASN.
  • Spot connection leaks: a device with thousands of TIME_WAIT or CLOSE_WAIT connections usually has a misbehaving application.
  • Check a specific port: search for :443 or :53.

See Also