{"id":15780070,"url":"https://github.com/rgl/debian-router-ansible-vagrant","last_synced_at":"2026-04-30T20:33:47.665Z","repository":{"id":139751077,"uuid":"367968703","full_name":"rgl/debian-router-ansible-vagrant","owner":"rgl","description":"example debian linux router provisioned by ansible in a vagrant environment","archived":false,"fork":false,"pushed_at":"2022-03-12T09:59:37.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-31T11:05:59.159Z","etag":null,"topics":["ansible","debian","debian-linux-router","router","vagrant"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-05-16T19:31:20.000Z","updated_at":"2023-11-05T09:34:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"71a59f67-7778-4349-ba48-d4967837e0ae","html_url":"https://github.com/rgl/debian-router-ansible-vagrant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rgl/debian-router-ansible-vagrant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fdebian-router-ansible-vagrant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fdebian-router-ansible-vagrant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fdebian-router-ansible-vagrant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fdebian-router-ansible-vagrant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgl","download_url":"https://codeload.github.com/rgl/debian-router-ansible-vagrant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgl%2Fdebian-router-ansible-vagrant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32476682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"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":["ansible","debian","debian-linux-router","router","vagrant"],"created_at":"2024-10-04T18:40:27.845Z","updated_at":"2026-04-30T20:33:47.652Z","avatar_url":"https://github.com/rgl.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nThis is an example debian linux router provisioned by ansible in a vagrant\nenvironment.\n\nVagrant VMs need to have a management network wich is NATted by the host,\nbut that makes it difficult to play with the linux router, so this essentially\nadds a secondary network interface that is used for routing, and replaces the\ndefault route that is set by DHCP in `eth0` to use our router in `eth1`\ninstead. So everything that would be normally done at `eth0` must be done\nin `eth1`.\n\nThe network is setup as:\n\n![](diagram.png)\n\n**NB** The dotted lines represent a network connection that is not directly used, instead, the traffic in those nodes goes through `eth1` and is routed by the `router` machine.\n\n**NB** For a non-ansible equivalent of this environment see\n[rgl/debian-router-vagrant](https://github.com/rgl/debian-router-vagrant).\n\n## Usage\n\nInstall the [base debian 11 box](https://github.com/rgl/debian-vagrant).\n\nInstall ansible in a python venv:\n\n```bash\n# NB this will use sudo to install system dependencies.\nbash ansible-install.sh\n```\n\nStart this environment:\n\n```bash\nsource ansible-env.sh\ntime vagrant up --provider=libvirt --no-destroy-on-error --no-tty\n```\n\nYou can later trigger the ansible playbook execution with `vagrant`:\n\n```bash\nvagrant up --provision\n```\n\nYou can also directly trigger the ansible playbook execution with\n`ansible-playbook`:\n\n```bash\nansible-inventory --list --yaml\nansible-playbook playbook.yml --check --diff #-vvv\nansible-playbook playbook.yml --diff #-vvv\n```\n\n## Network Packet Capture\n\nYou can easily capture and see traffic from the host with the `wireshark.sh`\nscript, e.g., to capture the traffic from the `eth1` interface on each VM:\n\n```bash\n./wireshark.sh router eth1 # or any\n./wireshark.sh node1 eth1 # or any\n./wireshark.sh node2 eth1 # or any\n```\n\n## Reference\n\n* https://www.vagrantup.com/docs/provisioning/ansible_intro\n* https://www.vagrantup.com/docs/provisioning/ansible_common\n* https://www.vagrantup.com/docs/provisioning/ansible\n* https://docs.ansible.com/ansible-core/2.12/user_guide/playbooks.html\n* https://docs.ansible.com/ansible-core/2.12/user_guide/playbooks_best_practices.html\n* https://docs.ansible.com/ansible-core/2.12/reference_appendices/YAMLSyntax.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fdebian-router-ansible-vagrant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgl%2Fdebian-router-ansible-vagrant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgl%2Fdebian-router-ansible-vagrant/lists"}