{"id":15627860,"url":"https://github.com/perguth/yggdrasil-protected-group","last_synced_at":"2025-08-20T23:10:19.444Z","repository":{"id":66835007,"uuid":"579531134","full_name":"perguth/yggdrasil-protected-group","owner":"perguth","description":"♻  • Sync Yggdrasil Peers, AllowedPublicKeys and whitelist IPs via UFW.","archived":false,"fork":false,"pushed_at":"2024-04-16T20:16:55.000Z","size":203,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-29T08:57:17.444Z","etag":null,"topics":["privacy","sync","ufw","yggdrasil","yggdrasil-network"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/perguth.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}},"created_at":"2022-12-18T01:46:48.000Z","updated_at":"2024-10-14T17:33:48.000Z","dependencies_parsed_at":"2024-10-22T11:41:52.340Z","dependency_job_id":null,"html_url":"https://github.com/perguth/yggdrasil-protected-group","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/perguth/yggdrasil-protected-group","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fyggdrasil-protected-group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fyggdrasil-protected-group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fyggdrasil-protected-group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fyggdrasil-protected-group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perguth","download_url":"https://codeload.github.com/perguth/yggdrasil-protected-group/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perguth%2Fyggdrasil-protected-group/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271400259,"owners_count":24752830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["privacy","sync","ufw","yggdrasil","yggdrasil-network"],"created_at":"2024-10-03T10:19:51.622Z","updated_at":"2025-08-20T23:10:19.409Z","avatar_url":"https://github.com/perguth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yggdrasil Protected Group\n\n\u003e Sync [Yggdrasil Network](https://yggdrasil-network.github.io/) `Peers`, `AllowedPublicKeys` and whitelist IPs via [UFW](https://manpages.ubuntu.com/manpages/bionic/en/man8/ufw.8.html).\n\nWhen you start building your own Yggdrasil Network cluster you face the decision of either not connecting to the wider network or having all of the nodes in your cluster beeing exposed to it. Using this script you can form a private group of nodes that can reach each others ports while keeping them unavailable to the rest of the network.\n\nThis script:\n\n- Adds a new config file under `/etc/yggdrasil-protected-group.conf`\n- **Watches** the new **config file** for changes\n- Automatically **syncs** changes **with** the **group**\n- Automatically updates and **restarts Yggdrasil**\n- **Whitelists group members** Yggdrasil IPs for access to local ports via UFW\n- The properties `Peers` and `AllowedPublicKeys` in `/etc/yggdrasil/yggdrasil.conf` will be managed by this service and automatically overriden on changes\n\n## Install\n\n```bash\n# Install the systemd service\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/perguth/yggdrasil-protected-group/main/setup.sh)\"\n\n# Set/copy the `SharedSecret` of the group\nsudo nano /etc/yggdrasil/yggdrasil-protected-group.conf\n# and restart the service if changed\nsudo service yggdrasil-protected-group restart\n# Repeat the previous steps on all nodes.\n\n# Add your allowed Yggdrasil peers to:\nsudo nano /etc/yggdrasil-protected-group.conf\n# Changes will be synced to all nodes.\n# Peers will be whitelisted and Yggdrasil restarted automatically.\n\n# Already whitelisted IPs are shown with\nsudo ufw show added\n\n# Enable the firewall\nsudo ufw enable\n```\n\n## Usage\n\nDirectly edit the [Hjson](https://hjson.github.io/) (\"JSON with comments\") file:\n\n`/etc/yggdrasil-protected-group.conf`\n```\n{\n  SharedSecret: ...\n  Peers:\n  {\n    GroupShared: [\n      # Some comment\n      tls://somehost:443\n    ]\n    LocalOnly: []\n  }\n  AllowedPublicKeys:\n  {\n    GroupShared: [\n      # Another comment\n      A-public-key-EIANruysiaUISaiu...\n    ]\n    LocalOnly: []\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperguth%2Fyggdrasil-protected-group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperguth%2Fyggdrasil-protected-group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperguth%2Fyggdrasil-protected-group/lists"}