Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
DynDNS client - how to get the right WAN IP
« previous
next »
Print
Pages: [
1
]
Author
Topic: DynDNS client - how to get the right WAN IP (Read 1642 times)
scream
Jr. Member
Posts: 61
Karma: 2
DynDNS client - how to get the right WAN IP
«
on:
December 23, 2021, 04:01:59 pm »
Hi
I'm running opnsense since a long time and using dynamic DNS with cloudflare to update my DNS record to the current public IP.
Unfortunately my FW can not directly connect to the providers network so I have to use the given ISP router in front of my opnsense.
Since the internet speed is not so good, the ISP got me a LTE Extention to the ISP router.
All TCP traffic that reaches the router will be balanced between both links. (Multipath TCP)
The problem I now facing in is that dyndns with cloudflare uses the public source IP to define the dynDNS record.
As the TCP https requests is also balanced I randomly get the public IP of the cellular network on the dynDNS record. This doesn't work as it uses carrier grade NAT.
So I was looking for another solution. I found out, that with a simple curl command in bash I can ask the router for the current public IP on the DSL.
My question now is: Is it possible to use some curl command to get information of the public IP first and use this IP to update dynamic DNS record?
Logged
koushun
Jr. Member
Posts: 95
Karma: 9
Digital pimp hard at work.
Re: DynDNS client - how to get the right WAN IP
«
Reply #1 on:
December 30, 2021, 10:12:57 pm »
If you can read bash, this script for Cloudflare might be a good option:
https://github.com/K0p1-Git/cloudflare-ddns-updater
It is all about replacing the "ip" variable in this script, as far as I can see.
If you provide your curl command, I will have a go at it.
I have 3 hours of bash scripting experience, so probably some other chaps will figure this one out
Logged
Running OPNsense through Proxmox
4 x Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz (1 Socket)
24 GB RAM
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.7 Legacy Series
»
DynDNS client - how to get the right WAN IP