{"id":15631893,"url":"https://github.com/jaymzh/v6-gw-scripts","last_synced_at":"2025-07-06T14:39:17.901Z","repository":{"id":49219467,"uuid":"45283520","full_name":"jaymzh/v6-gw-scripts","owner":"jaymzh","description":"Scripts for native V6 gateways.","archived":false,"fork":false,"pushed_at":"2021-06-23T05:20:31.000Z","size":22,"stargazers_count":14,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T03:47:30.228Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaymzh.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}},"created_at":"2015-10-31T00:48:51.000Z","updated_at":"2024-10-18T16:16:33.000Z","dependencies_parsed_at":"2022-09-13T11:32:09.104Z","dependency_job_id":null,"html_url":"https://github.com/jaymzh/v6-gw-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fv6-gw-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fv6-gw-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fv6-gw-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaymzh%2Fv6-gw-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaymzh","download_url":"https://codeload.github.com/jaymzh/v6-gw-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251638756,"owners_count":21619662,"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":[],"created_at":"2024-10-03T10:41:58.770Z","updated_at":"2025-04-30T03:47:36.229Z","avatar_url":"https://github.com/jaymzh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# v6-gw-scripts\n\nThese are scripts to helpe people setup a v6 gateway on ISPs who hand out a v6 block. They have only been tested with Comcast. See https://www.phildev.net/phil/blog/?p=308 for all the gory details.\n\n## Setup\n\n* Update /etc/sysctl.conf to set:\n\n```\nnet.ipv6.conf.$YOUR_EXTERNAL_INTERFACE.accept_ra=2\nnet.ipv6.conf.$YOUR_EXTERNAL_INTERFACE.forwarding=0\n```\n\nReplacing `$YOUR_EXTERNAL_INTERFACE` with your external interface.\n\n### RA Daemon\n\nThese scripts can now support `dnsmasq` or `radvd`\n\n**For radvd:**\n\n* Install radvd on your gateway and create `/etc/radvd.conf.tmpl` (which these scripst will use to create radvd.conf) that looks like this:\n\n```\ninterface __IFACE__\n{\n   AdvSendAdvert on;\n   RDNSS 2001:4860:4860::8888 2001:4860:4860::8844 {};\n   prefix __PREFIX__\n   {\n     AdvOnLink on;\n     AdvAutonomous on;\n   };\n};\n```\n\nThe scripts will update `__PREFIX__` and `__IFACE__` for you.\n\n**For dnsmasq:**\n\n* Install dnsmasq and create `/etc/dnsmasq.conf.tmpl` *(sample is included in the template - You need to set some params yourself)*\n  * The scripts will replace `__INTERFACES__` and `__PREFIXES__` for you.\n\n**Script Locations:**\n\n* Drop `dhclient-ipv6` into `/etc/dhcp/dhclient-exit-hooks.d/`\n* Drop `99-ipv6` into `/etc/network/if-up.d/` (or your distribution's equivalent)\n* Drop `ipv6_prefix_dhclient.conf` in `/etc` and update it to accurately represent your setup.\n\n## Multiple prefix\n\nWe now support multiple prefixes. We assume you want one /64 per interface. If you add additional interfaces to the `OTHER_IFACES` variable in `ipv6_prefix_dhclient.conf` then additional prefixes will be requested, and one will be put on each interface. Radvd's configuration will be updated accordingly.\n\nThere are a few things to note about multiple prefix support:\n* Not all ISPs support requesting more than one. Comcast does, however.\n* If you request more than one, but are only getting one, it's because comcast remembers the type of request made with a given DUID and always returns an answer to that same type of request when given the same DUID. You can remove the DUID in your leases file to fix this.\n* DHCPv6 will associate an IAID with each prefix and, assuming you keep getting the same prefixes, those IAIDs will be consistent. Therefore `dhclient-ipv6` will keep a mapping of interface we associate-to-IAID so we can always put the right prefix on the right interface. This mapping is kept in `/var/lib/dhcp/dhclient-ipv6-mapping`. I highly recommend not messing with the files in there.\n\n## Extra notes:\n\n* You need at least version 4.1.1-P1-17 of isc-dhcp-client\n* You need to allow UDP traffic to/from fe80::/10 and to port 546/from port 547 - unless you have `nf_conntrack_dhcpv6` module available and use conntrack.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymzh%2Fv6-gw-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaymzh%2Fv6-gw-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymzh%2Fv6-gw-scripts/lists"}