[Ddclient-support] [ddclient - Feature Request] RE: logout & locked out
Brought to you by:
supersandro2000,
wimpunk
From: SourceForge.net <no...@so...> - 2007-07-16 16:04:58
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4415132 By: mlnutt A good router *should* lock out other machines if it is currently being administered; that, makes total sense. Only in this way can an administer be assured that the configuration they are viewing is the one being used. The code for logging out (at least for my router NetGear wgt624) is simple to implement. In get_ip(), after the geturl() call to obtain the IP is made I request my router's logout page '/LGO_logout.htm' if ($url) { $reply = geturl('', $url, opt('fw-login'), opt('fw-password')) || ''; geturl('', 'http://' . opt('fw') . '/LGO_logout.htm', opt('fw-login'), opt('fw-password')); } } It would be easy to add another field to the %builtinfw array of structures to accommodate logging out. e.g., 'netgear-wgt624' => { 'name' => 'Netgear WGT624', 'url' => '/RST_st_dhcp.htm', 'skip' => 'IP Address</B></td><TD NOWRAP width="50%">', 'logout' => '/LGO_logout.htm', }, and then the above call to logout could be reworked to if ($reply && $logout) geturl('', 'http://' . opt('fw') . $logout, opt('fw-login'), opt('fw-password')); where, of course, $logout has been instantiated to the corresponding 'logout' field for the user selected %builtinfw. Now, as to my second point. If ddclient fails for some reason to obtain the IP from the router (or any other method) the default behavior is to use the LAN IP of the server itself. This behavior is wrong and should not be performed. ddclient should not attempt to perform an update in this case. The server' LAN IP is not the server's internet IP; if it is you probably don't need ddclient. The option of allowing the user to select multiple IP grabbing strategies is to ensure that all possible options for obtaining the internet IP are exhausted before failing. This is not a complex task. Method 1 fails, try method 2, etc. After all, the point of ddclient is to update the internet IP so that your server is accessible to the outside world reliably. Let's say that "http://checkip.dyndns.org/" is for some reason off-line, if we can check our IP from "http://ipdetect.dnspark.com/" shouldn't we do so? I don't know about you but I want my server to be on-line as much as possible. Ideally, I'd like to first try and get the IP from my router. If this fails, then secondarily get the IP from a web source. And thirdly if both those attempts fail then to perform an external command such as 'host mydomainname.com' to get the IP. If all these methods fail then do nothing but issue an alert and try again later. Perhaps try a bit sooner than the specified update checking interval because we want the server on-line as soon as possible. None of this is complex or difficult to implement. ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=467339 |