I have a NextCloud server that needs to be connected to the internet. Therefore I have connected my domain through A and AAAA record to my home IPv4 and IPv6. Works fine as my internet supplier does not change addresses IP addresses. I use IP/Cloud that works fine! If I request the “DNS Name” in a browser however I see the login screen of the router.
What I would really like is the login screen of my server
At IP/Cloud the "Public Address"of IPv4 and IPv6 is transferred from from ether1, there is no other possibility. To me it seems an great improvement if at IP/Cloud one can specify the MAC address of one of the connected devices to the router could be specified to be able to achieve a stable connection to my server instead of the router itself.
Is there an other way to achieve a stable DDNS for my server?
Thank you for helping me. Yes I have everything working very well with port forwarding both IPv4 and IPv6 and separate guest network with some help from this forum, great!
Here follows my current configuration:
It shouldn’t be difficult, luckily I don’t need it myself, so my experience is limited, but at first sight there are different tools ready for the job (e.g. ddclient). And if you’re using own domain (as it seems you do), then if there’s some API for its DNS, you can do it without relying on any other party.
MT DDNS in the 3 years that I use it, only failed for 2 days (Problem with MT related DDNS domain)
MT IP/Cloud DDNS was fine for 99.99% of the time.
For the rest it doesn’t matter what device does the DDNS update.
I use the NAS (Synology for its Nextcloud in Docker container) to do it for the NO-IP set DDNS (NO-IP requires monthly reset for the free DDNS registration)
Only one DDNS name can be maintained in the NAS. I needed some more.
So I added (copied from somewhere from Internet ) the following script in de MT, to refresh the NO-IP DDNS: (EDIT the <> fields with the proper data)
This MT with script can be anywhere in the LAN. (It is behind NAT, does NAT etc … it retrieves and uses the public IP , just as MT IP/Cloud does)
The DDNSes point to the public IP. I can use any DDNS set here for any purpose, actually one is used for another MT doing the VPN server HUB function, with DDNS fallbacks to IP/Cloud.
#Dynamic DNS Update Script for No-IP DNS behind nat
# Set needed variables
:local username "<my NO-IP user name>"
:local password "<my NO-IP password>"
:local host "<my hostname with NO IP>.ddns.net"
:global previousIP
# print some debug info
:log info ("Update No-IP DNS: username = $username")
:log info ("Update No-IP DNS: hostname = $host")
:log info ("Update No-IP DNS: previousIP = $previousIP")
#
# behind nat - get the public address using dyndns url http://checkip.dyndns.org
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:delay 2
:local result [/file get dyndns.checkip.html contents]
:log info "dyndns result = $result"
# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "</body>" -1]
:local currentIP [pick $result $startLoc $endLoc]
:log info "No-IP DNS: currentIP = $currentIP"
:if ($currentIP != $previousIP) do={
:log info "No-IP: Current IP $currentIP is not equal to previous IP, update needed"
:set previousIP $currentIP
:local url "http://dynupdate.no-ip.com/nic/update/?myip=$currentIP&hostname=$host"
:log info "No-IP DNS: Sending update for $host"
/tool fetch url=$url user=$username password=$password mode=http dst-path=("no-ip_ddns_update.txt")
:log info "No-IP DNS: Host $host updated on No-IP with IP $currentIP"
:delay 2
:local result [/file get "no-ip_ddns_update.txt" contents]
:log info "Update Result = $result"
} else={
:log info "No-IP: update not needed "
}
# end
It appears that all of the responses above have completely misunderstood what is the issue…
It is not related to IP Cloud DDNS, it is not related to the updating of DDNS, the OP even told us he has a static address and basically only uses DDNS to get a name mapped.
Where he goes wrong is when he wants to direct the traffic to an internal server. That is NOT done by changing something in the DNS, it is called “port forwarding”.
Probably it is all a misunderstanding: he is trying to access his DNS name from the inside, where it does not work due to the lack of hairpin NAT (which you would not want to have in this case)…
>
.
.
> The only proper solution is to tell ISP to stop doing stupid things and keep static addresses.
Monthly fee x 20 with my ISP, when fixed public IP (business account) is wanted ..... AFAIK, couldn't find cheaper option
Well, it’s confusing. I mistakenly read it as “Works fine as long as my internet supplier does not change addresses IP addresses.” Looking at OP’s older threads (and I participated there too, who would have thought ), that’s not the case (“My internet provider does not change the prefix of my IPv6 address (nor my IPv4 address) as long as I keep the same equipment.”), only problem could be with RouterOS that could sometimes change IPv6 subnets on interfaces, but even that shouldn’t happen if one isn’t fiddling with config too much. But then I don’t know what’s the point of DDNS, because I can also see that at addresses (IPv4/6) pointed to by DDNS hostname is also another domain, so using DDNS just to have some hostname is not necessary.
@bpwl: I don’t like business decisions of some ISPs. Paying extra for public IPv4 address, oh well, there’s not enough of those and it prevents wasting them on people who don’t need them that much. Paying extra for static address? No, just no, if they have some public one they can give me, then making it dynamic is just intentionally cripling the service in order to squeeze more money from customers. Even worse is blocking incoming connections, because “home users don’t need to run servers”. Hell no! Fortunatelly it doesn’t usually happen where I live.
@sob and other reactions.
My internet service provider is usually stable. Some days ago I was, with my mobile phone trying to connect to my server to do a lookup. It failed…because my IPS changed the IPv4 and IPv6. That’s why I started to get interested in securing the connection by using DDNS. After further exploration I come to the conclusion that it is quite complicated to realise DDNS for both IPv4 and IPv6. I agree with your comments about ISP’s.
Sorry about the confusion I may have caused.
I wouldn’t say it’s complicated. It’s slightly different. If you have only IPv4, then with typical setup you have one public address on router, so it’s one hostname and it covers all internal servers you might have. MikroTik’s DDNS works and it’s just few clicks. If you add IPv6, then every device has own address and you’d either need predictable and reliable way how to know it beforehand, to make some centralized updates (but you can’t do it with current RouterOS), or you have to do updates from every device. And since they are behind NAT, they are in worse position to detect IPv4 changes. So it needs some more work, but complicated is probably too strong word.