IPv6 with Hurricane Electric

Under construction

  • This how-to describes the method for setting up 6in4 tunnel on OpenWrt with Hurricane Electric tunnel broker.
  • Provide IPv6 connectivity for LAN clients.
  • Access your LAN services remotely without port forwarding.
# Install packages
opkg update
opkg install 6in4
# Configuration parameters
# Configure firewall
uci rename firewall.@zone[0]="lan"
uci rename firewall.@zone[1]="wan"
uci del_list firewall.wan.network="wan64"
uci add_list firewall.wan.network="wan64"
uci commit firewall
/etc/init.d/firewall restart
# Fetch WAN IP address
. /lib/functions/network.sh
network_find_wan NET_IF
network_get_ipaddr NET_ADDR "${NET_IF}"
# Configure tunnel
uci -q delete network.wan64
uci set network.wan64="interface"
uci set network.wan64.proto="6in4"
uci set network.wan64.tunlink="wan"
uci set network.wan64.ipaddr="${NET_ADDR}"
uci set network.wan64.peeraddr="${HENET_PEER}"
uci set network.wan64.ip6addr="${HENET_IPV6}"
uci add_list network.wan64.ip6prefix="${HENET_PFX64}"
uci add_list network.wan64.ip6prefix="${HENET_PFX48}"
uci commit network
/etc/init.d/network restart
# Configuration parameters
# Configure tunnel
uci -q delete network.wan64.ipaddr
uci set network.wan64.tunnelid="${HENET_TUNID}"
uci set network.wan64.username="${HENET_USER}"
uci set network.wan64.updatekey="${HENET_UPKEY}"
uci commit network
/etc/init.d/network restart
uci -q delete network.gw64
uci set network.gw64="route6"
uci set network.gw64.interface="wan64"
uci set network.gw64.target="::/0"
uci commit network
/etc/init.d/network restart
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2021/04/03 19:37
  • by vgaetera