{"id":13930201,"url":"https://github.com/thomas-maurice/dupont","last_synced_at":"2025-09-02T18:30:37.700Z","repository":{"id":48087067,"uuid":"393415316","full_name":"thomas-maurice/dupont","owner":"thomas-maurice","description":"Creates VXLAN overlay networks over wireguard","archived":false,"fork":false,"pushed_at":"2021-08-08T09:04:50.000Z","size":51,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-07T23:47:47.979Z","etag":null,"topics":["networking","sdn","vxlan","vxlan-tunnel","wireguard","wireguard-tunnel"],"latest_commit_sha":null,"homepage":"","language":"Go","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/thomas-maurice.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}},"created_at":"2021-08-06T15:14:57.000Z","updated_at":"2024-09-06T07:45:46.000Z","dependencies_parsed_at":"2022-08-12T18:20:28.845Z","dependency_job_id":null,"html_url":"https://github.com/thomas-maurice/dupont","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-maurice%2Fdupont","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-maurice%2Fdupont/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-maurice%2Fdupont/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomas-maurice%2Fdupont/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomas-maurice","download_url":"https://codeload.github.com/thomas-maurice/dupont/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231800818,"owners_count":18428586,"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","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":["networking","sdn","vxlan","vxlan-tunnel","wireguard","wireguard-tunnel"],"created_at":"2024-08-07T18:05:07.800Z","updated_at":"2024-12-30T01:18:02.241Z","avatar_url":"https://github.com/thomas-maurice.png","language":"Go","funding_links":[],"categories":["sdn"],"sub_categories":[],"readme":"# dupont\n\nCreates VXLAN tunnels over wireguard\n\n## Why ?\n\nWireguard does not allow you to route arbitrary traffic through a tunnel, let's say I have this setup\n\n* Network A: 10.0.0.0/24\n* Network B: 10.1.0.0/24\n* Tunnel A\u003c\u003eB 10.3.0.0/24\n\nYou cannot make A and B communicate without having to NAT traffic, hence masking the original IPs.\n\nTo get around this you can create an overlay network on top of the wireguard tunnel.\n\n## How ?\nLook at the config files in the `examples` directory\n\nThen compile the binary\n```bash\n$ make\n$ ./bin/dupont -what apply -config examples/host-1.hcl\n# You can teardown the config by doing\n$ ./bin/dupont -what delete -config examples/host-1.hcl\n```\n\n## Example config\n\nYou can write the configurations both in yaml and HCL, the HCL being the more readable\none, as follows:\n\n```hcl\n# Make sure we enable ip forward and co\nensureSysctl = true\n\n# Our interfaces definitions\ninterfaces {\n  # Wireguard interfaces definitions\n  wireguard \"wg-0\" {\n    # First interface definition\n    address = \"192.168.69.1/32\"\n    port    = 6969\n    key {\n      privateKey = \"4CQWNQylWDWoZGgWDj58skAQuC84v1JXBKKqLTwcb3c=\"\n      # Note that specifying the public key here is a matter\n      # of convenience, you would not have that (prolly) on\n      # an actual deployment\n      publicKey = \"bScGfgslFnmIEcuAdU8PQla6OtE29VntPOd3rOb5phs=\"\n    }\n    peer \"wg-0\" {\n      description = \"Laptop\"\n      key {\n        publicKey = \"NYNj4shJcxucrhgNTwRg1sshlCT9cGKvClWEsycm/28=\"\n      }\n      allowedIPs = [\n        \"192.168.69.2/32\",\n      ]\n      endpoint {\n        address = \"10.99.1.200\"\n        port    = 6969\n      }\n      keepAlive = 5\n    }\n  }\n  vxlan \"vx-0\" {\n    address = \"192.168.70.1/24\"\n    vni     = 60\n    parent  = \"wg-0\"\n    neighbour {\n      address = \"192.168.70.2\"\n    }\n  }\n}\n```\n\nWhich produces something like that:\n```\n$ ip address\n[...]\n40: wg-0: \u003cPOINTOPOINT,NOARP,UP,LOWER_UP\u003e mtu 1420 qdisc noqueue state UNKNOWN group default \n    link/none \n    inet 192.168.69.2/24 brd 192.168.69.255 scope global wg-0\n       valid_lft forever preferred_lft forever\n41: br-vx-0: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1350 qdisc noqueue state UP group default \n    link/ether 8a:a5:6a:ec:81:e5 brd ff:ff:ff:ff:ff:ff\n    inet 192.168.70.2/24 brd 192.168.70.255 scope global br-vx-0\n       valid_lft forever preferred_lft forever\n    inet6 fe80::88a5:6aff:feec:81e5/64 scope link \n       valid_lft forever preferred_lft forever\n42: vx-0: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1350 qdisc noqueue master br-vx-0 state UNKNOWN group default \n    link/ether 8a:a5:6a:ec:81:e5 brd ff:ff:ff:ff:ff:ff\n    inet6 fe80::88a5:6aff:feec:81e5/64 scope link \n       valid_lft forever preferred_lft forever\n```\n\n## Topologies\nYou can also use dupont to generate the topology of the network for you. Create a file like so\n```hcl\nname = \"example topology\"\n\nnetwork {\n    wireguard     = \"10.80.0.1/24\"\n    overlay       = \"10.80.1.1/24\"\n    vni           = 42\n    wireguardPort = 6060\n}\n\nhosts = {\n    pi1 = \"19.99.1.60\"\n    pi2 = \"19.99.1.61\"\n    pi3 = \"19.99.1.62\"\n    pi4 = \"19.99.1.63\"\n}\n```\n\nThen run `./bin/dupont -what generate -config config/topology.hcl` and it will generate one file per host in a folder\nnamed after the `topology ID` of the said topology. It is basically a short hash of the topology name. You would have\nthen something like\n```bash\n$ tree 657861/\n657861/\n├── pi1.hcl\n├── pi2.hcl\n├── pi3.hcl\n└── pi4.hcl\n\n0 directories, 4 files\n```\n\nYou only have to copy those files on every host of the mesh, then apply the config and you are done !","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-maurice%2Fdupont","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomas-maurice%2Fdupont","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomas-maurice%2Fdupont/lists"}