title: domain names and hosts file
body: <p>i have a small network setup which contains a firewall which has a public static ip, a switch connected to the green NIC and 3 servers connected to the switch.</p>
  
  <p>what i am trying to do is register multiple domain names then point them to my single public static ip which has my router on it. then whenever a request is sent to say example1.com the master DNS registar forwards to my ip, but then based on the requested domain name i want to forward that request to a specific static ip in the "local" network behind the router.</p>
  
  <p>how would i accomplish this using hosts file, would a simple entry in my router's hosts file like 
  example1.com 192.168.1.122
  example2.com 192.168.1.134
  redirect traffic from domain name to the server behind the router through a single public IP or do i need to setup a DNS server.</p>
  
  <p>also if i were to decide to use DNS, would i need to setup DNS with slave forward zone?</p>
  
  <p>PS: im not asking for step by step tutorials but rather a conceptual explanation cause im a bit confused</p>
  
  <p>thank you</p>