{"id":22663701,"url":"https://github.com/yuuki/lsconntrack","last_synced_at":"2026-03-09T04:31:57.706Z","repository":{"id":57523840,"uuid":"122760799","full_name":"yuuki/lsconntrack","owner":"yuuki","description":"The Linux netfilter conntrack-based connection flows pretty printer.","archived":false,"fork":false,"pushed_at":"2018-03-05T00:28:09.000Z","size":899,"stargazers_count":41,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-06T01:39:46.499Z","etag":null,"topics":["conntrack","go","linux","netfilter","tcp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuuki.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-24T17:05:50.000Z","updated_at":"2024-03-20T11:06:11.000Z","dependencies_parsed_at":"2022-09-26T18:10:40.852Z","dependency_job_id":null,"html_url":"https://github.com/yuuki/lsconntrack","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/yuuki/lsconntrack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flsconntrack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flsconntrack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flsconntrack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flsconntrack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuuki","download_url":"https://codeload.github.com/yuuki/lsconntrack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuuki%2Flsconntrack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30283416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conntrack","go","linux","netfilter","tcp"],"created_at":"2024-12-09T12:32:42.598Z","updated_at":"2026-03-09T04:31:57.669Z","avatar_url":"https://github.com/yuuki.png","language":"Go","readme":"# lsconntrack\n\n[![Build Status](https://travis-ci.org/yuuki/lsconntrack.png?branch=master)][travis]\n[![Go Report Card](https://goreportcard.com/badge/github.com/yuuki/lsconntrack)][goreportcard]\n\n[license]: https://github.com/yuuki/lsconntrack/blob/master/LICENSE\n[travis]: https://travis-ci.org/yuuki/lsconntrack\n[goreportcard]: (https://goreportcard.com/report/github.com/yuuki/lsconntrack)\n\nlsconntrack prints `host flows` (aggregated connection flows to the same source or destination ports) tracked by Linux netfilter conntrack and enables you to simply grasp the network relationship between localhost and other hosts.\n\nfriend: [yuuki/lstf](https://github.com/yuuki/lstf)\n\n## Features\n\n- Distinction of `active opens` and `passive opens`\n- Print also packets and bytes of each flows (the absolute values are meaningless)\n- Go portability\n- Filter by ports (--active-ports and --passive-ports)\n- stdin support (combination with [conntrack-tools](http://conntrack-tools.netfilter.org/))\n- JSON support\n- TCP support only\n- TODO: streaming support\n\n## Environment\n\n- Linux only\n  - Tested on CentOS5, Debian7, Debian8\n\n## Setup\n\n- Load ip_conntrack / nf_conntrack module\n- Download the binary from https://github.com/yuuki/lsconntrack/releases .\n\n## How to use\n\n```shell\n$ lsconntrack -n\nLocal Address:Port   \u003c--\u003e   Peer Address:Port     Inpkts  Inbytes   Outpkts Outbytes\nlocalhost:many       --\u003e    10.0.1.10:3306        5521792 123258667 5423865 282041045\nlocalhost:many       --\u003e    10.0.1.11:3306        58800   3062451   58813   3061627\nlocalhost:many       --\u003e    10.0.1.20:8080        123     169638    62      3580\nlocalhost:80         \u003c--    10.0.2.10:80          23      6416      25      25460\nlocalhost:80         \u003c--    10.0.2.11:80          38      8574      34      32752\n```\n\n```shell\n# Prints active open connections from localhost to destination hosts.\n$ lsconntrack --active\nLocal Address:Port   \u003c--\u003e   Peer Address:Port     Inpkts  Inbytes   Outpkts Outbytes\nlocalhost:many       --\u003e    10.0.1.10:3306        5521792 123258667 5423865 282041045\nlocalhost:many       --\u003e    10.0.1.11:3306        58800   3062451   58813   3061627\nlocalhost:many       --\u003e    10.0.1.20:8080        123     169638    62      3580\n...\n```\n\n```shell\n# Prints passive open connections from destination hosts to localhost.\n$ lsconntrack --passive\nLocal Address:Port   \u003c--\u003e   Peer Address:Port   Inpkts  Inbytes   Outpkts Outbytes\nlocalhost:80         \u003c--    10.0.2.10:many      23      6416      25      25460\nlocalhost:80         \u003c--    10.0.2.11:many      38      8574      34      32752\n...\n```\n\n### filter by port\n\n```shell\n$ lsconntrack --active --aport 3306 --aport 11211\n```\n\n### via stdin\n\n```shell\n$ cat /proc/net/nf_conntrack | lsconntrack --stdin\n```\n\n### JSON format\n\n```shell\n$ lsconntrack --json | jq -r -M '.'\n[\n  {\n    \"direction\": \"active\",\n    \"local\": {\n      \"Addr\": \"localhost\",\n      \"Port\": \"many\"\n    },\n    \"peer\": {\n      \"addr\": \"10.0.100.1\",\n      \"port\": \"3306\"\n    },\n    \"stat\": {\n      \"total_inbound_packets\": 1491,\n      \"total_inbound_bytes\": 1480239,\n      \"total_outbound_packets\": 1537,\n      \"total_outbound_bytes\": 520613\n    }\n  },\n  {\n    \"direction\": \"passive\",\n    \"local\": {\n      \"addr\": \"localhost\",\n      \"port\": \"80\"\n    },\n    \"peer\": {\n      \"addr\": \"10.0.200.1\",\n      \"port\": \"many\"\n    },\n    \"stat\": {\n      \"total_inbound_packets\": 1491,\n      \"total_inbound_bytes\": 1480239,\n      \"total_outbound_packets\": 1537,\n      \"total_outbound_bytes\": 520613\n    }\n  },\n  ...\n]\n```\n\n## License\n\n[MIT][license]\n\n## Author\n\n[yuuki](https://github.com/y_uuki)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuuki%2Flsconntrack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuuki%2Flsconntrack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuuki%2Flsconntrack/lists"}