Thread: [Ddclient-support] [ddclient - Feature Request] logout & locked out
Brought to you by:
supersandro2000,
wimpunk
From: SourceForge.net <no...@so...> - 2007-07-15 16:22:11
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4413718 By: mlnutt I too would like a router logout feature. I've hard coded one into the ddclient script specifically for my router so that my server doesn't lock out router administration from other machines. What I noticed in testing this is that if the router is being administered by another machine and thus the server employing ddclient can not yank the IP then ddclient defers to the server (LAN) IP and uses it for the update. That is to say, if ddclient can't get the IP from the router it uses the server machine IP (i.e., 192.168.0.2). This is surely wrong. What I believe is needed is the ability to specify a secondary (and perhaps ternary) means for obtaining the IP should the primary scheme fail. For instance, if I can't get my IP from my router then I'd like to fetch it from a web check but never, never, never, from the host machine. The default behavior should be for ddclient to fail if the explicitly specified method(s) are unable to obtain the IP. ______________________________________________________________________ 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 |
From: SourceForge.net <no...@so...> - 2007-07-16 10:25:59
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4414620 By: wimpunk I don't have such a router so either some has to send me one or send me the code how to handle it. Personally I even should not buy such a router, it sounds like a lot of problems. Your problem could probably be fixed if you look at the result of what the router replies when there's already someone logged in. I guess your configuration isn't correct for such a situation. Your suggestion on what you think you needs seems to complex for me. I really suggest you buy a good router which handles everything like it has to. Kind regards, wimpunk. ______________________________________________________________________ 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 |
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 |
From: SourceForge.net <no...@so...> - 2007-07-16 16:28:37
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4415156 By: mlnutt An error on my part: ddclient doesn't, as I state, use the server's LAN IP for the update. What is happening is that the router returns a page indicating the IP of the machine that is managing the router. An error on ddclient's part: The $reply variable isn't validated for the content of the $skip variable. This string should be matched and if not found in $reply then no IP string should be parsed from $reply. ______________________________________________________________________ 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 |