Wednesday, 22 June 2011

Access computer behind router over the internet

Here's a few notes which I find useful for accessing my system over the internet from an external location.

Is the remote system behind a router?
If so, use the router's IP address. Either go to whatismyip.com, or get the router's IP Address from the router control panel (typically 192.168.1.1). This will be the IP address you will use to access the system.

Enabling remote access
Enable remote access to the system. For windows, its usually at "Right Click My Computer > Properties > Remote/Remote Settings". Here you can also configure who is allowed to access the system.

Systems behind a router
Setup port forwarding to the system in question. Find your local IP address (usually 192.168.x.x) and forward the necessary ports to this system. I.e. for HTTP, use port 80. So when you visit the router's IP address over HTTP (http://externalRouterIP), it will forward the request to your machine. Another useful one is 3389 for remote desktop.
Optional: It may be useful to set a static IP for your system. This ensures that your internal IP address stays the same. If your router software does not support this, you can figure your own in Network Settings under the Control Panel in Windows.

No comments: