Is the WAN interface connected to your ISP? If so, it likely needs to be configured for DHCP (unless you have one or more static IPs assigned by the ISP, which is very uncommon for "home" users).
Yes, my wifirouter (wndr3700) is connected to my ISP. The ISP modem has given, with DHCP, the local IP-dres. That is normal, I think.
I suppose I had to change something in the config-file. But I do not know what.
In the records ...
What type is the uplink of your ISP modem: cable/DSL/something else?
Is your ISP modem set to bridge mode? Does it have a page with status information or even adjustable settings?
Does your ISP offer IPv6, and could you use it instead of IPv4 for connections from outside?
You will probably need forward ports in the ISP modem as well. Have you checked that the server you want to be available works through the external IP? If not there is not much use in setting up DDNS.
Switching the modem to "bridged" mode may make your configuration a lot more robust. When in bridge (or pass-through) mode, the public IP is assigned to your OpenWrt router and the modem does no NAT
You'll have to check on the Internet or other sources, but there may be an "advanced options" tab or the like where you can change it to bridged mode. You may need to "bump" the network on your OpenWrt box after you do that so it gets a new IP address on its LAN.
Behind the ISP modem I have several wndr3700 wifi routers. Each router serves with or without wifi a network with a specific task. Therefore, I do not think it is wise to put the ISP modem on "bridge".
I have one router that functions as a vpn-443 "road warrior" solution. I use it for unsafe WiFi and when I am abroad and need a natonal ip. Because sometimes (not often) my ISP-IP (= wan_ip) changes, I want to apply ddns, at changeip, com I now have a ddns address that corresponds with my current wan_ip address. The dynamic dns gives you the possibility to always have the right wan_ip at home even if you are far away. My ddns provider says "you are comparing a local ip adres with a wan_ip adres and thats a error. he is right. So I search for a way to ask "what is my current wan ip and then I can compare it with the ddns-proveder ip.
So, is it possible to put a command in the config-file (or in the ddns-script) that reads the ip of wan? Or is that thinking too simple?
Kind regards, Lucas
It sounds like you've thought through your network topology and are comfortable with where and how NAT is being done.
There isn't a "trivial" way for the OpenWrt router to know your public IP(s), as they aren't interfaces on the device. I can see two ways of approaching it:
Use a feature of your DDNS provider that uses the source IP of the connection, rather than something you put in the payload
Make a request to one of the servers that will return the source IP it sees and base your request to the DDNS provider on that.
(1) is the simplest, if your DDNS provider supports it. That is what I would try first if in your situation.
On (2), I just used Google to find https://www.ipify.org/ (I have never used the service, nor do I know anything about its reliability, data stewardship practices, or the like). Based on that page, it looks very straightforward with both plain-text and JSON response formats available.