How DynDNS detect the WAN IP ?
The WAN of my pfsense is behind a modem/router with router mode on, i can't put it in bridge mode.
With port forwarding or DMZ from modem to pfsense, there is no problem and the system is as with a modem in bridge mode.
I want to know how (wich process) that the "dyndns client" in pfsense use to detect the public IP :
-Does it just take the WAN IP ? (i think)
-Does it read a .conf file ?
-Does it read public IP form an obselete URL ?
I want to modify this process to use a whatismyip URL witch return a raw value (if you know : http://www.whatismyip.fr/raw/) …
Si the question is : how is detected the public IP ?
The WAN IP is used. There is no other option at this time.
after multiples searchs in pfsense files, i have not find the function used to use the WAN ip for do updates …
i haven't localised the function "update dyndns" ...
does anybody know where locate it ?
I will modifi the definition of WAN_IP …
simply create a php file and put it on public webserver (with php support) :
echo $_SERVER[REMOTE_ADDR]; ?>
And modify : /etc/inc/dyndns.class
Replace this :
$wan_ip = get_current_wan_address();
By this :
$filename = "HTTP://YOUR_WEBSERVER_URL/YOUR_FILE.PHP"; $handle = fopen ($filename, "r"); $wan_ip = fread ($handle, 20); fclose ($handle);
If you want, you can create a function with this code and call it (do not forget the "return;" at the end of function).