Skip to content

Instantly share code, notes, and snippets.

@dabrovnijk
Created February 11, 2019 23:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabrovnijk/abd1172736c6e586b895b8efe8f1ee8a to your computer and use it in GitHub Desktop.
Save dabrovnijk/abd1172736c6e586b895b8efe8f1ee8a to your computer and use it in GitHub Desktop.
Edgerouter lite, Gavlenet, IPv6 settings, dhcpv6-pd
# Version: v1.10.8
# Build ID: 5142440
# Build on: 11/20/18 16:45
# Copyright: 2012-2018 Ubiquiti Networks, Inc.
# HW model: EdgeRouter Lite 3-Port
#
# Gavlenet Edgerouter lite
#
# I guess that this will work for other ISPs as well.
#
# This shorter version are extra settings based on a edgerouter lite with the wizard "Basic Setup" done.
# In that wizard I assume the following options:
# * DHCPv6 PD [x] Enable DHCPv6 Prefix Delegation
# * Prefix length [/56]
# * Firewall [x] Enable the default IPv6 firewall
# * IPv6 LANs [eth1, eth2]
#
# * WAN - eth0
# * LAN1 - eth1
# * LAN2 - eth2
#
# The wizard will create most of the settings, for instance IPv6 firewall, dhcpv6-pd.
#
# Gavlenet use /56 prefix lenght.
#
# You have change to change settings for:
# * domain-name LOCAL.EXAMPLE.COM
# * domain-search,LOCAL.EXAMPLE.COM
# * gateway-address ISP.GATEWAY.HERE.WAN
#
# I use dnsmasque to do DHCPv6, slaac, for your LAN IPv6, and to make your local host resolve for both IPv4 and IPv6
# for your LAN.
# Your router will handle DNS queries.
# (This should solve any issues you may have with Windows 10 losing IPv6 functionality if your router receives a new lease for IPv6)
#
# Cut and paste each section, each section ends with "commit; save"
configure
set firewall ipv6-name WANv6_IN rule 30 action accept
set firewall ipv6-name WANv6_IN rule 30 description 'Allow IPv6 icmp'
set firewall ipv6-name WANv6_IN rule 30 log disable
set firewall ipv6-name WANv6_IN rule 30 protocol icmpv6
delete interfaces ethernet eth0 dhcpv6-pd pd 0 interface eth1 service slaac
delete interfaces ethernet eth0 dhcpv6-pd pd 0 interface eth2 service slaac
set interfaces ethernet eth0 dhcpv6-pd prefix-only
set interfaces ethernet eth0 dhcpv6-pd rapid-commit disable
set interfaces ethernet eth0 dhcpv6-pd pd 0 interface eth1 no-dns
set interfaces ethernet eth0 dhcpv6-pd pd 0 interface eth2 no-dns
commit; save
set service dhcp-server disabled false
set service dhcp-server hostfile-update disable
set service dhcp-server shared-network-name LAN1 authoritative enable
set service dhcp-server shared-network-name LAN1 subnet 192.168.1.0/24 dns-server 192.168.1.1
# CHANGE BELOW 1 LINE
set service dhcp-server shared-network-name LAN1 subnet 192.168.1.0/24 domain-name LOCAL.EXAMPLE.COM
set service dhcp-server shared-network-name LAN2 authoritative enable
set service dhcp-server shared-network-name LAN2 subnet 192.168.2.0/24 dns-server 192.168.2.1
# CHANGE BELOW 1 LINE
set service dhcp-server shared-network-name LAN2 subnet 192.168.2.0/24 domain-name LOCAL.EXAMPLE.COM
commit; save
set service dhcp-server use-dnsmasq enable
set service dns forwarding cache-size 4000
set service dns forwarding listen-on eth1
set service dns forwarding listen-on eth2
set service dns forwarding options bind-dynamic
set service dns forwarding options enable-ra
set service dns forwarding options 'dhcp-range=set:lan1v6,::100,::1ff,constructor:eth1,slaac,ra-names,259200'
set service dns forwarding options 'dhcp-option=tag:lan1v6,option6:dns-server,[fe80::]'
# CHANGE BELOW 1 LINE
set service dns forwarding options 'dhcp-option=tag:lan1v6,option6:domain-search,LOCAL.EXAMPLE.COM'
set service dns forwarding options 'dhcp-range=set:lan2v6,::100,::1ff,constructor:eth2,slaac,ra-names,259200'
set service dns forwarding options 'dhcp-option=tag:lan2v6,option6:dns-server,[fe80::]'
# CHANGE BELOW 3 LINES
set service dns forwarding options 'dhcp-option=tag:lan2v6,option6:domain-search,LOCAL.EXAMPLE.COM'
set system domain-name LOCAL.EXAMPLE.COM
set system gateway-address ISP.GATEWAY.HERE.WAN
set system name-server 127.0.0.1
commit; save
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment