{"id":27054988,"url":"https://github.com/aschmidt75/ipvsctl","last_synced_at":"2026-04-26T23:31:39.005Z","repository":{"id":144203738,"uuid":"204482569","full_name":"aschmidt75/ipvsctl","owner":"aschmidt75","description":"Lightweight IPVS cli frontend with dynamic \u0026 desired state configuration. `ipvsctl apply`FTW","archived":false,"fork":false,"pushed_at":"2025-05-11T14:00:57.000Z","size":142,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-11T14:42:58.393Z","etag":null,"topics":["go","ipvs","linux"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aschmidt75.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-26T13:33:36.000Z","updated_at":"2025-02-06T06:58:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd74fcc4-e4e8-42aa-80e1-51e63a59daa7","html_url":"https://github.com/aschmidt75/ipvsctl","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/aschmidt75/ipvsctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschmidt75%2Fipvsctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschmidt75%2Fipvsctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschmidt75%2Fipvsctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschmidt75%2Fipvsctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aschmidt75","download_url":"https://codeload.github.com/aschmidt75/ipvsctl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aschmidt75%2Fipvsctl/sbom","scorecard":{"id":211016,"data":{"date":"2025-08-11","repo":{"name":"github.com/aschmidt75/ipvsctl","commit":"b7e9abdaf2fcb7b5015f25eee2f332b9f67b869a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:9","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/aschmidt75/ipvsctl/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/aschmidt75/ipvsctl/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/aschmidt75/ipvsctl/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/aschmidt75/ipvsctl/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/aschmidt75/ipvsctl/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/aschmidt75/ipvsctl/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/aschmidt75/ipvsctl/release.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: goCommand not pinned by hash: Dockerfile:4","Warn: goCommand not pinned by hash: .github/workflows/ci.yml:39","Warn: downloadThenRun not pinned by hash: .github/workflows/release.yml:37","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   1 out of   3 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:12"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.3.3 not signed: https://api.github.com/repos/aschmidt75/ipvsctl/releases/219180755","Warn: release artifact v0.3.2 not signed: https://api.github.com/repos/aschmidt75/ipvsctl/releases/219175891","Warn: release artifact v0.2.3 not signed: https://api.github.com/repos/aschmidt75/ipvsctl/releases/42795825","Warn: release artifact v0.2.2 not signed: https://api.github.com/repos/aschmidt75/ipvsctl/releases/39343388","Warn: release artifact v0.2.1 not signed: https://api.github.com/repos/aschmidt75/ipvsctl/releases/26802801","Warn: release artifact v0.3.3 does not have provenance: https://api.github.com/repos/aschmidt75/ipvsctl/releases/219180755","Warn: release artifact v0.3.2 does not have provenance: https://api.github.com/repos/aschmidt75/ipvsctl/releases/219175891","Warn: release artifact v0.2.3 does not have provenance: https://api.github.com/repos/aschmidt75/ipvsctl/releases/42795825","Warn: release artifact v0.2.2 does not have provenance: https://api.github.com/repos/aschmidt75/ipvsctl/releases/39343388","Warn: release artifact v0.2.1 does not have provenance: https://api.github.com/repos/aschmidt75/ipvsctl/releases/26802801"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":3,"reason":"SAST tool is not run on all commits -- score normalized to 3","details":["Warn: 1 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T00:46:16.569Z","repository_id":144203738,"created_at":"2025-08-17T00:46:16.569Z","updated_at":"2025-08-17T00:46:16.569Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"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":["go","ipvs","linux"],"created_at":"2025-04-05T09:18:05.339Z","updated_at":"2026-04-26T23:31:38.999Z","avatar_url":"https://github.com/aschmidt75.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipvsctl\n\n`ipvsctl` is a command line frontend for IPVS using desired state configuration. It reads an IPVS services/destinations model from a YAML file, detects changes to the current configuration and applies those changes. It can pull parameters dynamically from the environment, files or URLs.\n\nIt is meant as an add-on to ipvsadm, where changes can be applied from models instead of ad-hoc commands.\n\n[![CI](https://github.com/aschmidt75/ipvsctl/actions/workflows/ci.yml/badge.svg)](https://github.com/aschmidt75/ipvsctl/actions/workflows/ci.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/aschmidt75/ipvsctl)](https://goreportcard.com/report/github.com/aschmidt75/ipvsctl)\n\n## Features\n\n* Adding, Updating and Deleting services and destinations using YAML models\n* Services using TCP,UDP,SCTP and FWMARK\n* All schedulers, all forwards\n* Setting Weights on destinations, keeping existing weights when updating destinations\n* Setting addresses from dynamic parameters (e.g. from environment, files, uris.)\n\nCurrently not supported\n\n* IPv6 addresses are not yet supported\n* Timeouts, Netmasks, Scheduling flags, Statistics, Thresholds are not supported yet\n\n`ipvsctl` is a command line tool, but can also be used as a go library to programmatically work with ipvs in a model based fashion.\n\n## Documentation\n\nPlease see [the documentation section in doc/](doc/) for more details on commands, model elements etc. \n\n## Example\n\n* write a sample ipvs configuration file, using placeholder variables. Define a service with two destinations\n* `apply` the configuration, filling placeholders from environment variables and local network interface\n* `get` the active ipvs configuration\n* use classic `ipvsadm` to view the configuration\n* use the `set` command to change the weight of an individual destination\n\n```\n# cat \u003e/tmp/ipvsconf \u003c\u003cEOF\nservices:\n- address: tcp://\\${host.eth0}:7656\n  sched: rr\n  destinations:\n  - address: 10.50.0.1:\\${env.MYPORT}\n    forward: nat\n  - address: 10.50.0.2:\\${env.MYPORT}\n    forward: nat\nEOF\n\n# MYPORT=8080 ipvsctl --params-network --params-env apply -f /tmp/ipvsconf\n\n# ipvsctl get\nservices:\n- address: tcp://10.1.2.3:7656\n  sched: rr\n  destinations:\n  - address: 10.50.0.2:8080\n    forward: nat\n  - address: 10.50.0.1:8080\n    forward: nat\n\n# ipvsadm -Ln\nIP Virtual Server version 1.2.1 (size=4096)\nProt LocalAddress:Port Scheduler Flags\n  -\u003e RemoteAddress:Port           Forward Weight ActiveConn InActConn\nTCP  10.1.2.3:7656 rr\n  -\u003e 10.50.0.1:8080               Masq    0      0          0\n  -\u003e 10.50.0.2:8080               Masq    0      0          0    \n\n# ipvsctl -v set weight 100 --service tcp://10.1.2.3:80 --destination 10.50.0.1:8080\nINFO Updated weight to 100 for service tcp://10.1.2.3:80/10.50.0.1:8080\n\n# ipvsadm -Ln\n[...]\n  -\u003e 10.50.0.1:8080               Masq    100    0          0\n  -\u003e 10.50.0.2:8080               Masq    0      0          0\n```\n\nFor using ipvsctl programmatically as a library within your own go code, see [doc/libraryexample1](doc/libraryexample1) and [doc/libraryexample2](doc/libraryexample2).\n\n## Prerequisites\n\n* Linux\n* ipvs kernel modules installed and loaded\n* for building ipvsctl: go 1.16\n\n## Install\n\nYou can build ipvsctl as described below or install one of the versions under the `releases` tab.\n`ipvsctl` makes modifications to the ipvs tables, so it either needs to be run as root or equipped\nwith the appropriate capabilities, e.g.:\n\n```bash\n$ VERSION=0.2.3\n$ URL=https://github.com/aschmidt75/ipvsctl/releases/download/v${VERSION}/ipvsctl_${VERSION}_$(uname -s)_$(uname -m).tar.gz\n$ curl -L $URL | tar xfvz -\n$ chmod +x ipvsctl\n\n$ # either run as root ...\n$ sudo cp ipvsctl /sbin\n$ # .. or open for all users\n$ sudo cp ipvsctl /usr/local/bin\n$ sudo setcap 'cap_net_admin+eip' /usr/local/bin/ipvsctl \n```\n\nCaution as this allows any user to modify ipvs tables! Please evaluate whether `sudo` or `setcap` is the right approach for you.\n\n## Build\n\nThis project builds correctly for Linux only.\n\n```bash\n$ make\n$ dist/ipvsctl --version\n0.2.3\n```\n\n## Test\n\nipvsctl contains three kinds of tests: \n* unit tests for only small portions of the code \n* integration tests (desctructive, will overwrite ipvs tables)\n* bats-based end-to-end tests for all cli functions (desctructive, will overwrite ipvs tables)\n\n### Unit and integration tests\n\nIntegration tests will touch ipvs tables, so it's required to run as root:\n\n```\n# go test -cover ./...\n```\n\n### End to end tests\n\nE2E tests run on the linux command line using bats. The test scripts run all commands of\nipvsctl and compare the output against what ipvsadm tells about the underlying ipvs data - or vice versa.\n\nTo run the tests, build ipvsctl using the above command, install the necessary prequisites on the host:\n\n* enable ipvs\n* install ipvsadm\n* install bats\n* docker is necessary for testing parameter file pulls from URIs\n\nTest cases can be run like this:\n\n```bash\n$ cd tests\n$ bats .\n ✓ given any of the model files applied in sequence, when i build a changeset for the same model, it must always be empty\n ✓ given a configuration with defaults, when i apply it, all default port values must have been set correctly.\n ✓ given a configuration with defaults, when i apply it, all default scheduler values must have been set correctly.\n[...]\n77 tests, 0 failures\n```\n\n## License\n\n(C) 2019,2025 @aschmidt75, Apache 2.0 license\nexcept package ipvs, integrated from https://github.com/docker/libnetwork (C) 2015 Docker, Inc. Apache 2.0 license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faschmidt75%2Fipvsctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faschmidt75%2Fipvsctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faschmidt75%2Fipvsctl/lists"}