i am doing some network programming:
i want to be able to switch lights in my house either on or off through the network,WAN.The lights are connected to a computer through the paralel port.i.e the computer is at home.i have achieved the control of the lights at LAN level.

my problem is:
1.accesing the remote computer through the gateway,because the nework programming only IP configuration of REMOTE COMPUTER,but not through another one. as in from public IP to Private IP in the LAN.;different location.please help

2.rerouting of the feedback to know the status of the lights.

8 Years
Discussion Span
Last Post by nymph

Since you have already achieved control over your lights through your LAN, I am guessing you have some sort of listener (a kind of server) set up which actually listens to these requests on the PC where you have connected the lights on the serial port.

To achieve the same from a PC connected to the Internet but not in your LAN, you will need to set up Port forwarding on your Gateway machine.
In port forwarding "a port" on your local machine "is forwarded" to your gateway, such that any requests coming on that specific port on your gateway would be "forwarded" to a port of specific machine on your LAN.
For example :-
Assume "" is the machine on which your program to switch off the lights is running and listening on port 8080 . Your gateway is "" on LAN and "" is its static IP.

Using port forwarding you can tell the gateway machine to forward whatever content it receives on port 8080 (on its Static IP) to forward it to port 8080 of the machine.

Here is a small example of port forwarding, where the gateway is an ADSL Router and the machine to which content needs to be forwarded has Windows XP loaded on it.

Also once you have the socket connection established fro the remote machine, you can write the feedback back on the same socket.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.