Skip to content

Instantly share code, notes, and snippets.

@larstobi
Created February 15, 2019 08:13
Show Gist options
  • Save larstobi/947ac98d978c67b0a0579fc8d0e4df08 to your computer and use it in GitHub Desktop.
Save larstobi/947ac98d978c67b0a0579fc8d0e4df08 to your computer and use it in GitHub Desktop.
# Tutorial - IPv6 through CenturyLink via 6rd on UniFi Security Gateway
# Hello, everyone! I was able to get my UniFi Security Gateway 3P to work with IPv6 on CenturyLink gigabit fiber by using 6rd, after a lot of
# research and pulling my hair out in frustration. To save others in my situation from the same, I created a config.gateway.json file for you
# to use, as well as a tutorial for modifying the json file to suit your environment.
# Keep in mind that this assumes that:
# Your WAN interface is pppoe2
# Your LAN interface is eth1
# Your tunnel name is tun0
# (If the interface names change, you'll have to modify the JSON file itself accordingly.)
# First step is to go here: http://silmor.de/ipaddrcalc.html#ip46
# Expand "IPv4 to IPv6 Transitional" and look below "6to4 and 6RD Network Prefix"
# For Provider prefix IPv6, enter 2602::/24 (with the subnet in the next box)
# For Customer IPv4, enter your WAN IPv4 address. This will be used to generate your IPv6 prefix. You will want to use 64 bits.
# Then, click ISP -> Customer and it will generate your IPv6 Customer Prefix. Make a note of it (and leave out the :: at the end)
# Here is the JSON. Please use Find/Replace to replace the following placeholder names:
# [IPV4_LAN_SUBNET] = Your USG's internal IP and subnet. i.e.: "192.168.0.1/24"
# [IPV6_PREFIX] = Your IPv6 Customer Prefix that you generated in Step 4
# Links:
# http://silmor.de/ipaddrcalc.html#ip46
# https://www.altibox.no/privat/bredband/ipv6/
# https://community.ubnt.com/t5/EdgeRouter/IPv6-6rd-setup-configuration-writeup/td-p/2052351
# https://www.reddit.com/r/Ubiquiti/comments/9dyjep/tutorial_ipv6_through_centurylink_via_6rd_on/
{
"interfaces": {
"ethernet": {
"eth0": {
"address": [
"10.0.0.1/24",
"0123:4567:89ab:cdef::1/64"
],
"ipv6": {
"dup-addr-detect-transmits": "1",
"router-advert": {
"cur-hop-limit": "64",
"link-mtu": "1472",
"managed-flag": "false",
"max-interval": "300",
"other-config-flag": "false",
"prefix": {
"0123:4567:89ab:cdef::/64": {
"autonomous-flag": "true",
"on-link-flag": "true",
"valid-lifetime": "2592000"
}
},
"radvd-options": [
"RDNSS 2001:4860:4860::8888 2001:4860:4860::8844 {};"
],
"reachable-time": "0",
"retrans-timer": "0",
"send-advert": "true"
}
}
}
},
"tunnel": {
"tun0": {
"6rd-default-gw": "::5.6.7.8",
"6rd-prefix": "0123:4567::/30",
"address": [
"0123:4567:89ab:cdef::1/30"
],
"description": "IPv6 6rd tunnel",
"encapsulation": "sit",
"local-ip": "1.2.3.4",
"mtu": "1472",
"multicast": "disable",
"ttl": "255",
"firewall": {
"in": {
"ipv6-name": "WANv6_IN"
},
"local": {
"ipv6-name": "WANv6_LOCAL"
},
"out": {
"ipv6-name": "WANv6_OUT"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment