Mikrotik 6to4
Статья старая может и не работать
5
Конфигурация Mikrotik
Создание туннельного интерфейса
/interface 6to4 add comment="Hurricane Electric IPv6 Tunnel Broker" disabled=no local-address=<LOCAL_IP_ADDR> mtu=<CALCULATED_MTU> name=sit1 remote-address=216.66.84.46
/ipv6 route add comment="" disabled=no distance=1 dst-address=2000::/3 gateway=2001:db8:1:fcc::1 scope=30 target-scope=10
/ipv6 address add address=2001:db8:2:fcc::2/64 advertise=no disabled=no eui-64=no interface=sit1Выделение ipv6 адреса клиентам в локальной сети
/ipv6 address add address=<Routed /64> interface=bridge advertise=yes
/ipv6 nd set [ find default=yes ] advertise-dns=yes mtu=<MTU>Конфигурация DNS
/ip dns set allow-remote-requests=yes servers=2606:4700:4700::1111,2606:4700:4700::1001,2001:470:20::2,1.1.1.1,1.0.0.17
Обновление настроек туннеля при смене внешнего IPv4 адреса
/system script
add dont-require-permissions=no name=updatet owner=admin policy=read,write,policy,test source="# Update Hurricane Electric IP\
v6 Tunnel Client IPv4 address\
\n\
\n:global wanip\
\n\
\n:local userid \"<USER_ID>\"\
\n:local updatekey \"<UPDATE_KEY>\"\
\n:local tunnelid \"<TUNEL_ID>\"\
\n:local remotehostname \"ipv4.tunnelbroker.net\"\
\n:local waninterface \"<WAN_INTERFACE_NAME>\"\
\n\
\n:local outputfile \"tunnel-update-api-output\"\
\n\
\n:local currentip [/ip address get [/ip address find interface=\$waninterface] address ]\
\n\
\n:put \$wanip\
\n:put \$currentip\
\n:if ( \$wanip != \$currentip ) do={\
\n\
\n:set \$wanip \$currentip\
\n\
\n:log info \"Updating IPv6 Tunnel\"\
\n\
\n/tool fetch mode=https \\\
\n host=(\$remotehostname) \\\
\n url=\"https://\$userid:\[email protected]/nic/update\?hostname=\$tunnelid\" \\\
\n dst-path=(\$outputfile)\
\n\
\n/file remove \$outputfile\
\n\
\n}\
\n\
\n"/system scheduler add interval=10s name=trigger on-event=updatet policy=read,write,policy,test start-date=feb/1/2019 start-time=19:00:00Последнее обновление