Skip to main content

Kullanım Kılavuzu (İngilizce)

Automatic access type selection in KeenDNS

Imagine a connection to the Internet where the primary ISP provides access with a public IPv4 address, while the backup connection uses a 3G/4G modem connection, and the address assigned by the mobile operator is private. And you need to provide fault tolerance for remote connections in this environment.

Question: How can I set up the KeenDNS service so that the domain name works in the 'Direct access' mode when the primary provider is online, and when I switch to a backup provider, the 'Cloud access' mode is activated?

Answer: This is possible.

In the router's web interface, on the 'Domain name' page, on the KeenDNS tab, set the 'Auto' option to 'Operating mode (IPv4)'.

keendns-auto-mode-01-en.png

To check, you can run the command ping sample_name.keenetic.pro in your computer's operating system (use your registered name in KeenDNS instead of sample_name.keenetic.pro). When working via an ISP connection with a public IP, this command should determine the ISP-issued IP address (you can see it under 'System dashboard' > 'Connection details'). And when switching to a backup connection (in our example, it is a 3G/4G modem connection), pinging the KeenDNS name will show the IP address of the Keenetic cloud server, as the 'Cloud access' mode will be activated.

In the router's web interface, the 'Auto' mode setting has been available since KeeneticOS 3.7, but in earlier versions, you can enable this mode with special commands. See below for how to do this:

Initially, you must set up access according to the 'KeenDNS service' instructions by choosing the 'Cloud access' mode.

Then, run a command to switch the KeenDNS service to automatic access type selection mode:

ndns book-name {name} {domain} auto

Here is a sample output of a successfully triggered command:

(config)> ndns book-name sample_name keenetic.link auto

done, layout = view, title = NDSS::ndns/bookName (Public DNS Hostname Booking), sub-
title = The name booking was successful.:

(...)

item, elapsed = 87, origin = [TaskBookName, {"name":"sample_name","domain":"keenetic.link",

"license":"(service_tag)"}], type = complete, peer = *, detail = All done.:

Ndns::Client: Booked "sample_name.keenetic.link".

The command is executed once and the setting does not need to be saved, as the KeenDNS service configuration is not stored locally on the device, but on the cloud server.

Note that if you select 'Direct Access' or 'Cloud access' in the web interface's 'Network rules' > 'Domain name' > 'KeenDNS' > 'Operating mode' menu, the auto access mode setting made with the above command will be overwritten.