Friday, 22 December 2017

networking - Is it possible to host a web server from behind a NAT


My PC is behind a NAT router that has a public IP address. If I want to host a website then I believe I need a domain name which I can purchase from some site which would pledge to resolve all DNS requests for that domain name and send the IP address of my NAT router (assuming I do not want to host my domain name on their servers). Now I want to host a web server on my computer.



  1. What changes should be done to the NAT router's configuration to forward all HTTP requests for example.com to my PC in the internal network.

  2. Is the above strategy correct?

  3. Is it commonly used?



Answer



It is feasible to host a server behind NAT as you describe.
Look at this Ubuntu help page on ServersBehindNAT for basics.


Some more references,



  1. Hosting Apache server behind a NAT

  2. Setting up a server behind a NAT
    this uses a NAT Buffalo AirStation series router and Linksys router examples

  3. Windows XP Internet Connection Sharing method. if you have a Windows machine doing NAT

  4. [If you are using XP, you may also use IIS 6 5 (1 virtual host support) by going to Control Panel > Add and Remove Programs > Add Windows Component > Internet Information Services.


This is assuming you know how to host a web server and need ideas on NAT.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...