Friday, November 26, 2010

Configuring Virtual Server

One of my beloved blog reader ask me to show how to setup virtual server(sorry I'm late becoz no time to open blog ). The reason to setup virtual server is to:

  • allow incoming request(http, ftp etc2) from outside to enter server located inside
  • to allow specific request to reroute to appropriate server(in case 1 server host many services)
I will demonstrate how I did it using my Aztech DSL1000EW becoz my Aztech WL830RT4 is currently not in use.
Things we need is:
  • Server itself. I'll use XAMPP as my webserver(apache) and inside, there's a index.html file which is target file I want to access.

  • Proper connectivity to internet, obviously and router that has virtual server feature
  • Your external IP address. To know your ext IP, visit HERE from your server
  • Internal IP or IP address of the computer that will act as server

Procedures:

1. Install XAMPP, run Apache and make sure it works by visit localhost or 127.0.0.1(depends on your configuration though).

2. Ok. If that went fine, proceed to step 2-configure virtual server. As I mention earlier, I'll use DSL1000EW so the GUI will be a lil bit different but I guess the term/jargon will not so different between manufacturer and model ;)
  • Access your gateway. For me it's 192.168.1.1. Enter username and password to continue login

  • Search for virtual server funtion and press 'ADD'

  • Select appropriate service(ftp, http, dns etc2). Whenever you select one service, router will automatically put port and protocol for you. So, for HTTP which uses port 80, router will enter 80 for external and internal port by default and TCP for the protocol. If you made any changes in webserver configuration(like port), feel free to edit the field or if you cannot find specific application, just enter it yourself the port.
  • In the server IP address field, enter the internal IP address(IP address of the webserver) in my case, I'll use 192.168.1.2

  • Click Apply/Save and you're done.
What we've done here is to command router to forward any HTTP packet it receives from outside to specified IP address that host the webserver. That's it.



Now, try access from another PC that using other external IP address. In my case, I'll access from same PC so I'm gonna use proxy website. Enter your server external IP address not internal IP address-this is where lot people do the mistake.


press enter, then...
...And..Voila!..It works!

Now, I've several tips to improve this virtual server thingy.
1. Using Dynamic DNS(DDNS). If you are using internet package with dynamic IP(like PPPOE), please consider to subscribe with DDNS provider like DYNDNS. For more provider and how to configure is outside of this post scope. Please visit: HERE

2. Again, use DDNS to make it easier for visitors to visit your site. To remember number like IP is difficult so by using DDNS, you can have your own FQDN like server1.dyndns.org

3. If the server is getting IP from DHCP, consider to manually specify IP. This is because, DHCP may(and may not) change IP of the server.

Alrite. Should you guys have any question, feel free to comment. I'll try my best to help you out.:)

noty2: Aztech WL830RT4 is for sale..huhu..wireless got prob where max distance oni 8meters :(

3152E8B06184DCAA296BA720E4BD41CB

9 comments:

  1. This article was extremely interesting, especially since I was searching for thoughts on this subject last Thursday.

    ReplyDelete
  2. i'm using cisco by linksys , so can u show so guide for me ??
    thanks..
    and what is the benefit if i do this ?
    thanks..

    ReplyDelete
  3. amir: benefit is you and other peoples can access your server anywhere, in other words, transform you normal computer into server(http,email,file server,image server etc2)

    aku takde linksys la mir, sori la tak dpt wat artikel..:(

    ReplyDelete
  4. Vielen Dank für die hilfreichen Beitrag! Ich würde nicht anders bekommen haben!

    ReplyDelete
  5. Hey, I am checking this blog using the phone and this appears to be kind of odd. Thought you'd wish to know. This is a great write-up nevertheless, did not mess that up.

    - David

    ReplyDelete
  6. Hi & Goodday! I bought Aztech DSL1000EW today to replace my innacomm (tmnet) which strucked by lightning. Previously I could reach up to about 160 kbps but with Aztech, only near hundred. Is there a setting to make it normal again? Your advice is much appreciated senndoh, thanks! :D

    ReplyDelete
  7. hi iwan..thanks for your visit :)

    about your problem, are you using torrent of just normal download?..if torrent, you can try enable UPnP option in torrent client.

    OR

    disable altogether firewall both on router and pc itself but, you will vulnerable and make it easy to hacker(if then want to attack you la)heh..

    But, internet speed is really not predictable..sometime fast sometime slow..as screamyx said, best effort basis. Depends on your luck though :)

    And, what I can say with my experience with this router is overall not so good..internet keeps disconnecting..sometime, even if it's connected, I cannot access internet. :(

    Planning to get new router that support wireless N now:)

    ReplyDelete

Your comment is much appreciated. Thanks :)