Re: How to access a ethernet device behind a ADSL modem?
David Brown <[email protected]> Mon, 27 Oct 2008 10:37:06 +0100
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers.coldfire |
|---|---|
| Message-ID | <[email protected]> |
X-SpamDetect-Info: ------------- Start ASpam results --------------- X-SpamDetect-Info: This message may be spam. This message BODY has been altered to show you the spam information X-SpamDetect: ****: 4.000000 GreyPassed=1.0, DodgySource=2.0, SPF Default Fail=1.0 X-SpamDetect-Info: ------------- End ASpam results ----------------- Ricardo Raupp wrote: > Hi Folks > I developped a board with ethernet and some relays to home automation. > Till now, I know that the only way to connect with this board is: > - know the modem IP > - set a Port Forwarding (NAT?) feature in the modem web browser. > Well, ok... > But, imagine the modem has been replaced by a new one....the NAT > settings disappeared !!therefore the board is now unreachable! > I read about a protocol (?) / feature(?) called uPnP : Universal Plug > and Play and I understood the > own device connected to a switch could ask for Port Fowarfing. > It is a very important feature for people who wants to connect devices > wich are behind switchers / modensa etc.. > > Has anyone done it? > > Will it be what MSN and others do to be able to receive external > connections? > uPnP is certainly a way for devices to ask a router to enable port forwarding. However, not every NAT router supports it, and many have it disabled (either by default, or intentionally by the user). It is an insanely insecure concept which allows any software or hardware to bypass your firewall. It's a typical MS idea - in order to make it as easy as possible for legitimate software or hardware to open incoming connections (a laudable aim in itself), you allow *any* software or hardware to open incoming connections. Even if you use uPnP to open connections (or ask users to manually configure a port forward), you also have to consider how you are going to find the modem's IP - try a dynamic dns service. An alternative is for the board to initiate contact - it could regularly contact a server somewhere looking for new orders. That way you have no issues regarding connectivity or addressing. Remember also that there is no need for this communication to follow web-style request then immediate answer - your board could open a connection and leave it open. The server can then send commands as and when it wants to (such as in response to the user connecting to a web interface on the server). The only two disadvantages here are that open connections require some resources on your server, which could be an issue if you have many thousands of boards installed (consider regular polling, and only hold the connection open if it is needed), and that the user's Internet connection must be open all the time (not a problem for most people). --- [email protected] Send a post to the list. [email protected] Join the list. [email protected] Join the list in digest mode. [email protected] Leave the list.