How to set up ipv6 at the dacha with the LTE provider anlim.bel/unet for openwrt-based routers

Greetings to the Habrazhitels.

For quite some time now I have been puzzled by the issue of setting up ipv6 at my dacha because I would like to have direct access to devices (for example cameras, gateways, nas, etc.) without the crutches of vps/vpn or static ipv4 + port forwarding.
After all, the future has already arrived and ipv6 has been walking around the planet for a long time.

In my location, normal Internet can only be obtained through lte/3g operators; optics, unfortunately, have not yet reached our region.

A couple of years ago, none of the cellular operators known to me provided ipv6 service, despite the fact that they had already There has long been a decree of the President of the Republic of Belarus on mandatory support of ipv6 by all providers.

Recently I was again puzzled by this question and began to think about crutch options like such And such. But then the devil pulled me to ping the providers again (what if?).
And… Oh, miracle, it turns out the operator anlim.bel provides an ipv6 /64 subnet for 9.9 rubles/month (about $3)

After talking with those. support, I found out that they provide a service, but they do not have clear instructions on how to do it yourself. They offer to order the “setup by a specialist” service for ~$15 (guys, check the box in the connection settings to obtain ipv6 automatically? Seriously? Kamon :).
During further discussion, it turned out that they have a set of screenshots on how to do this on mikrotik ah, for routers based on openwrt (my case) there are no instructions.

After carefully studying the provided screenshots, I realized that everything is actually very simple: just set up a pptp connection and enable dhcpv6 on top of it.
The fact is that anlim.bel does not provide fair ipv6 (dual-stack IPv4 and IPv6), but uses an ipv6 via ipv4 tunnel.

This article is a step-by-step instruction/reminder for yourself and the community on how to configure ipv6 for openwrt-based routers.

It is assumed that you have already configured the Internet and ipv4 works correctly, how to do this for the mikrotik + openwrt combination you can read it here.

Step 1

Install the necessary packages on the router.
opkg install ppp-mod-pptp kmod-nf-nathelper-extra

Step 2

Create a pptp connection: Network -> Interfaces -> Add new interface
Name: arbitrary
Protocol: pptp

Step 3

Setting up a pptp connection
1) PAP/CHAP username:
2) PAP/CHAP password: 3) VPN Server: 10.74.6.25 (at the time of writing)

4) Here in the Advanced settings tab we make sure that:
Obtain IPv6 address: automatic
Delegate IPv6 prefixes: checked
IPv6 assignment length: 64

And click Save

Step 5

We turn off mppe in the ppp protocol settings because it is unlimited. Bel doesn't support it
The easiest way is to comment out the file /etc/ppp/options.pptp line with
mppe requiredthat is, it should be something like this:

cat /etc/ppp/options.pptp
noipdefault
noauth
nobsdcomp
nodeflate
idle 0
#mppe required,no40,no56,stateless
maxfail 0

And restart the interface

Step 6

If there were no problems in the previous steps, then we will see that the connection was successfully established, we received ipv6 /128 for pptp connection via dhcpv6 virtual interface (thanks to the obtain ipv6 automatically option) and ipv6 /64 PD for our network.

Step 7

We check for example via ping ipv6.google.com

PING ipv6.google.com (2a00:1450:4001:82a::200e): 56 data bytes
64 bytes from 2a00:1450:4001:82a::200e: seq=0 ttl=117 time=72.546 ms
64 bytes from 2a00:1450:4001:82a::200e: seq=1 ttl=117 time=63.099 ms
64 bytes from 2a00:1450:4001:82a::200e: seq=2 ttl=117 time=105.378 ms
64 bytes from 2a00:1450:4001:82a::200e: seq=3 ttl=117 time=61.707 ms
ipv6.google.com ping statistics —
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 61.707/75.682/105.378 ms

Hooray ! Everything is working !
Next, we configure the firewall/odhcp to our liking so that we can fix IPv6 addresses for devices within the home network and access them from the Internet.

Good luck!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *