Find the answer to your Linux question:
Results 1 to 3 of 3
Hello I need help with local DNS networking. On my network I have a server with 6 virtual servers all with there own local IP address like shown below. Virtual ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2013
    Posts
    2

    Help needed with local DNS networking


    Hello I need help with local DNS networking. On my network I have a server with 6 virtual servers all with there own local IP address like shown below.

    Virtual Server 1 192.168.1.201
    Virtual Server 2 192.168.1.202
    Virtual Server 3 192.168.1.203
    Virtual Server 4 192.168.1.204
    Virtual Server 5 192.168.1.205
    Virtual Server 6 192.168.1.206

    Lets say I install Apache and put up a website on Virtual Server 2 and Virtual Server 3. I then can enter the local IP address while I am on the network and the website will load fine.

    If I forward port 80 in my routers admin panel to 192.168.1.202 or 192.168.1.203 I can access the site by typing in my public IP address into the URL bar.

    So now I can go to Godaddy and change the A record of one of my domains and when I go to the site everything loads fine.

    This works fine and dandy if I only want to utilize one of my virtual server. What I would like to do is forward my public IP address at Virtual Server 1 and then it gets routed through Local DNS to Virtual Server 2 or Virtual Server 3 depending on the domain that was entered. I think the right way to do this is using Bind DNS and setting up zone files. I have tried to get this working but cant get the local DNS to route. Any help or direction is greatly appreciated!

  2. #2
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Stockholm, Sweden
    Posts
    1,296
    It is only port 80 you are wanting to "forward"? I suggest that you setup a proxy instead of using port forwarding, Apsis Pound is perfect for this. Run that on the internet facing host and use it to direct to whatever backend you want based on the domain and/or URL entered. It is very powerfull and easy to use! You can also use it for SSL termination.

    Apsis Gmbh

    I use it to serve 20~ domains and 1000's of clients without any issues.

  3. #3
    Just Joined!
    Join Date
    Nov 2013
    Posts
    15
    you should choose One of the Virtual Server's as a primary. and use apache: mod_proxy_http module to reverse proxy the other domain names.
    in httpd.conf add:
    LoadModule headers_module modules/mod_headers.so
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so

    in: /etc/apache2/sites-enabled/000-default
    modify the server name to the servers dns name.
    e.g:
    Code:
    ServerName VirtualServer1.example.com
    add additional config files in /etc/apache2/sites-enabled/

    for the other servers. that are reverse proxyied.
    e.g:
    /etc/apache2/sites-enabled/VirtualServer2.conf

    Code:
    <virtualhost *:80>
          ServerAdmin webmaster@localhost
          ServerName VirtualServer2.example.com
          ProxyRequests off
          <proxy *>
          Order deny,allow
          Allow from all
          </proxy >
          ProxyPass / hXXp://192.168.1.202/
          ProxyPassReverse / hXXp://192.168.1.202/
    </VirtualHost >
    (i cant post http links as i have not posted 15 posts yet. so obviously change hXXp to http)
    That should get you started.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •