Have you ever found yourself at a friend’s house, wishing you could access the music on your computer? Or maybe you wish it was easier to connect to your VNC share from web cafes or your office? Maybe you’ve even tried writing down your IP address before leaving home specifically so you could connect?
The main problem with that approach is that most ISPs change your IP on a regular basis. Some ISPs will give you a static IP – typically for a monthly premium – and such an IP can give you access from anywhere.
Alternatively, you can use DynDNS. This company specializes in solving exactly the problem you’re thinking of with a free Dynamic DNS setup – giving you a web address that will consistently point to your computer, even when your ISP changes your IP.
And if you just want one URL, it’s a free service.
How Free Dynamic DNS Works
Here’s the deal: you get an account at DynDNS, which provides you with a free URL. Then you set up your home network to inform DynDNS of your current IP on a regular basis – this can be done using the firmware in your router – most routers support such a free Dynamic DNS by default – or by installing free Dynamic DNS software on a computer on your network designed for this purpose.
Once everything is set up you’ll be able to access your home network from anywhere, using the URL provided to you by DynDNS.
Setting up DynDNS is easy. All you need to do is create a free Dynamic DNS account at their website, selecting a subdomain from their wide variety of domains.
Being the Linux enthusiast that I am, I choose “homelinux.com,” but the choice is largely aesthetic – just pick something you can remember easily.
Once your account is set up you’ll have a username and password you can use in order to use the service. What you need to do now is set up your home network to regularly report your IP to DynDNS.
Configure Your Router
The simplest way to do this is to configure your router to do so. How to do this varies depending on your brand and model of router, but for the most part the process goes something like this:
1. Type your router’s internal IP address into a web browser and hit “enter.” This will bring up your router’s web-based configuration.
2. Find the dynamic DNS option, and enter your settings.
On my Linksys router, this configuration looks something like this:
Typically all your router needs is your DynDNS username and password, so enter those and you’re good to go.
3. Apply your changes. This may shut down your router temporarily, but just start it up again.
Obviously configuring your router is the simplest way to do this, but if don’t have a router, or if your router doesn’t support DynDNS directly, you can download software here that can report your current IP to DynDNS.
Okay, so you’ve got your fancy URL now but attempting to use it to connect to your computer from elsewhere won’t help much unless you set up your router properly.
Your router essentially acts as a firewall, as all incoming requests are directed to it. Unless your router is specifically aware of what requests are going to come in, it will continue to block everything you try to connect to from outside your network. That’s where the magic of port forwarding comes in.
If you don’t know what a port is, the best analogy is that of an apartment number: if your IP address is like your street address, your port number is like your apartment number.
If your friend knows your street address, but not your apartment address, they’re not going to have much luck finding you. In the same way, if you’re connecting to your computer from somewhere else on the Internet you can’t just type your IP address: you need to specify which port you’re trying to access.
For example, popular remote-desktop software VNC uses 5900 as it’s default port. If I want to connect to one of my computers using VNC from outside my network – for example, from a web cafe – I need to make sure my router knows to forward all incoming requests to port 5900 to the computer I want to control.
Setting this up isn’t that difficult: it’s almost always possible from your router’s web-based configuration. On my Netgear router the setting screen looks something like this:
In the above example I’m setting up VNC to forward to my media center computer. Like setting up your router with DynDNS, be sure to apply your settings after you’ve added your new configuration.
If you’re not sure what port a particular program uses, you can either search that program’s configuration for the option to change it or search the program’s documentation.
There’s still more: the firewall on your computer may also block incoming requests, unless you set up your firewall to allow for connections on that port. Check your firewall’s documentation if you’re not sure how to do this.
VNC’s only one example of a program you can use this method to set up, of course. If you set up an FTP server on your computer you’ll be able to access your documents from everywhere. You could use this method to connect to any program’s WebUI, including the bittorrent client Deluge .
Basically anything you can connect to from within your network can be made to work Internet-wide with DynDNS, if you’re willing to set it up.
Testing your setup is easy: call a friend and see if they can connect to your computer using the programs you’ve set up.
Alternatively you could use a proxy service to connect to your computer. If you can connect through a proxy, after all, you’re connecting from outside your network.
Some ISPs – such as Qwest in the Western United States – provide modems that are intended to function as wireless routers as well as modems. If you have such a modem you might find that DynDNS doesn’t work for you. If this is the case you need to configure your modem to forward all requests to your router, from where port forwarding can properly happen.
If you think this is happening to you, check out the website of your ISP or give them a call. More likely than not they’ll be able to help you.
I use DynDNS to connect to my home network from elsewhere, and it works like a charm. Sure, setting it all up requires you learn some networking skills in the process, but if you’re reading MakeUseOf you probably love learning stuff anyway. And you never know when such skills might come in handy.
What about you guys? Do you use DynDNS or a similar service to connect to your computer remotely? Do you have any questions about setting this all up? As always, feel free to discuss everything in the comments below.