1

Our organisation uses Billion 7800 routers on ADSL with USB 4G/LTE failover. Whilst on ADSL our dynDNS registers the correct public IP address. When it fails over to 4G the USB dongle does not provide the Billion with the public IP but with the NAT'd IP of 192.168.8.100. As the dynamic DNS app/credentials are stored on the Billion the Billion updates the public record with the 192.168.8.100 address. This is not ideal.

We would like a way for the record to be the public IP address. A simple google can return the actual public IP address. Are there any dynamic DNS providers which can fetch the actual public IP from the registration request and use this public IP for the A record instead?

Our current providers response is simply 'reconfigure your network so the router can see the public IP' OR 'use the Windows client agent/app to perform the registration instead'. Neither of these is possible due to hardware limitations and software installation restrictions.

I can't see any way around this other than to use another provider who has the ability to dynamically determine the public IP that the request is coming in from and use that IP.

1

This looks like a trivial question. You can either:

  • install a dynamic DNS updater that most of the services provide (example for dynDNS) on any of your machines inside the network

  • periodically run a query (curl) that will update the value of your public IP (instructions for dynDNS)

|improve this answer|||||
0

One way to keep your "dynamic IP" in sync with your DNS is by using a service like Dyn or NoIP which provide their proprietary Domain names/Domain names to purchase.

However if you have your own custom domain name that you'd like to use, you can use the DNS services from NameSilo (http://www.namesilo.com) as your DNS provider and the powershell windows script below along with a scheduled task to replicate the Dyn/NoIP service.

Assuming you're running windows, here's a simple script that you can "schedule" using Task Scheduler to run on StartUp/Logon and then rerun every 6 hours (that way the maximum downtime due to an IP address change is 6 hours).

Save the script below in a file called NameSiloDDNS.ps1

# NameSilo API Dynamic DNS
#Variables
param([string]$APIkey=$(throw "APIKey is required"), [string]$domain=$(throw "Domain is required"), [string]$record)


###Code - Do not edit below this line
# Gather data about the DNS entries in the domain
$listdomains = Invoke-RestMethod -Uri "https://www.namesilo.com/apibatch/dnsListRecords?version=1&type=xml&key=$APIkey&domain=$domain"
$CurrentIP = $listdomains.namesilo.request.ip
if ($record) {
    $RecordIP = ($listdomains.namesilo.reply.resource_record|where {$_.host -eq "$record.$domain" -and $_.type -eq "A"}).value
    $RecordID = ($listdomains.namesilo.reply.resource_record|where {$_.host -eq "$record.$domain" -and $_.type -eq "A"}).record_id
} else {
    $RecordIP = ($listdomains.namesilo.reply.resource_record|where {$_.host -eq "$domain" -and $_.type -eq "A"}).value
    $RecordID = ($listdomains.namesilo.reply.resource_record|where {$_.host -eq "$domain" -and $_.type -eq "A"}).record_id
}
$listdomains.namesilo.reply
#Write-Host "CurrentIP $CurrentIP, RecordIP $RecordIP, RecordID $RecordID"

# If the current IP address is not the same as the one in the record it updates it
Write-Host "https://www.namesilo.com/apibatch/dnsUpdateRecord?version=1&type=xml&key=$APIkey&domain=$domain&rrid=$RecordID&rrhost=$record&rrvalue=$CurrentIP&rrttl=3600"
if ($CurrentIP -ne $RecordIP){
    if ($record) {
        Write-Host "Updating $record.$domain with IP $CurrentIP"
    } else {
        Write-Host "Updating $domain with IP $CurrentIP"
    }
    $update = Invoke-RestMethod -Uri "https://www.namesilo.com/apibatch/dnsUpdateRecord?version=1&type=xml&key=$APIkey&domain=$domain&rrid=$RecordID&rrhost=$record&rrvalue=$CurrentIP&rrttl=3600"
    $update.namesilo.reply
} else {
    Write-Host "No need to update $record.$domain, IP $CurrentIP upto date"
}

Next save the script below in a file called UpdateDDNSIPv4.bat.

PowerShell -ExecutionPolicy Bypass .\NameSiloDDNS.ps1 <NameSilo_API_Key> somedomain.com
PowerShell -ExecutionPolicy Bypass .\NameSiloDDNS.ps1 <NameSilo_API_Key> somedomain.com subdomain

Keep both the files in the same directory. UpdateDDNSIPv4.bat is the batchfile which should be called by Task Scheduler in your recurring task.

Couple of things to note, you will need to Login to your NameSilo account and under API Manager -> Generate an API Key which you need to enter in the batch script above to replace <NameSilo_API_Key>. This script can be used to update your A DNS records for the main domain (e.g. somedomain.com) and also for your subdomains (e.g. subdomain). You can create one line for each domain/subdomain you want to update.

This script will automatically find your "Public IP Address" and then update your NameSilo DNS A records.

You can find a BASH equivalent of this script here: https://github.com/pztop/namesilo_ddns

A Python equivalent of a script can also be found at: https://github.com/rbenji/DynamicDNS-for-NameSilo

This script was taken and customized from http://www.forkrobotics.com/2014/10/dynamic-dns-with-namesilo-and-powershell/

Hope this helps

|improve this answer|||||
0

you can use AnyDesk (version 5.2+) which allow you to set up TCP connection between clients.

I used it for connecting my client PC to a Team Foundation Server (TFS) over the internet. The server and client are behind NAT. I set the local and remote ports to '8080' and I can connect to server from client using this address on client: 'http://localhost:8080/tfs/'

Reference: TCP-Tunneling-AnyDesk

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.