Thursday, July 10, 2008

A small (and free) hosting solution !!

Recently I heard in a forum about how some people want to be able to have their own small private website without paying for it.

OK, my take on this is - don't do it. Its generally not worth it.
  1. Firstly, hosting is ultra cheap now. I have a domain (www.stockeconomics.com) and it costs me ~$9/yr. The hosting used to cost me like $4 a month (when I was hosting it - I am too lazy to do anything, so not hosting now). Overall cost was like $4.75/month. Ultra cheap by all standards. Now I am not advertising for the provider I used so I'd not take names.
  2. Secondly, and the bigger problem is security. If you have your home PC running your website, I would never be sure if you've secured it enough that no one can break into your system and steal your information. In running an HTTP or a FTP server on your PC, you're inviting anyone on the internet to be able to connect to your PC (albeit on port 80 or 21 respectively), but depending on your application and security it provides, someone will some day manage to break in.
  3. Most service providers' terms of service specifically disallows you from doing this. They will ask you to buy static IPs or business class service from them. They monitor port 80 or 8080 for activity. If you're running only a few MBs a day, you'd probably get away with it without noticing, but if you become greedy, they will notice and shut you down. Of course you can find ways around that too - run your HTTP service on a different port, or tunnel it through a VPN. I will discuss the second part sometime later.
Enough said.

If you really want to go ahead and do it, you can try what I did as a proof of concept.

1. I registered with dyndns.org. I created (say) abcd.dyndns.org.
2. I went to my router's configuration page. My router is Netgear MR814v2, and I have a link for Dynamic DNS configuration. If you have a different router, see if you have Dynamic DNS confguration. I provided DynDNS user name and password (from #1) in my router's configuration, and specified the port (say) 1234 to be used.
3. Set up Port Forwarding on my router for port 1234 for the computer (say) 192.168.0.7 in my network that will host my HTTP application(s).
4. I ran the Apache HTTP Server on my computer (192.168.0.7), on port 1234.
5. Opened the Windows firewall for Apache application.
6. Went to my browser and typed in http://abcd.dyndns.org:1234/. It works !!

The good thing is that you're running your HTTP traffic over port 1234 instead of 80. So no one will notice it immediately, though someone can simply run a port scan on abcd.dyndns.org to see that you have port 1234 open.

Do share your experiences if you try this.

No comments: