DNS Config behind a router - Public IP on a Private Network

Discussion in 'Installation/Configuration' started by Dennis93q, Jan 12, 2009.

  1. Dennis93q

    Dennis93q New Member

    Ok, so i finally setup my server with CentOS and blew away my installation of Redhat Enterprise Linux 5 (what a waste of time and money!) but now I have everything setup as in the perfect guide.

    This is the scenario:

    My public IP (let's say its 204.204.204.204) has a router attached to it. It only allows certain traffic in (25-SMTP, 80-WEB, 81-ISPCONFIG, 110-POP3, etc.). My CentOS server is 192.168.0.10 -- but known to the outside world as 204.204.204.204.

    My question is this... when I go and setup a site, it says its IP address is 192.168.0.10, and so its DNS is also created as 192.168.0.10

    I can't be the only one who puts a router in front of his network for security.... What do I do? Should I remove the router and directly connect my machine to the Internet and hope that I have everything secured tight? Is there any other way around this? What should I do??
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to use the internal IP addresses in the website settings and the external IP addresses in the dns manager settings.
     
  3. altaibskt

    altaibskt New Member

    i have the same problem would u plz explain more ...till
     
  4. falko

    falko Super Moderator Howtoforge Staff

    For DNS records, you must use your public IP address, but for your web site, you must use one of the IP addresses that you see in the output of
    Code:
    ifconfig
     
  5. oriongr

    oriongr Member

    One little trick I use to one of my servers is to put the public IP adrress in Management>Server>Settings>IP list

    When I create a site for first time I always select the public IP. I also check the created DNS record option.
    When the creation of the site is finished I go back to site manager I select he site and I change the IP from the public to the private one but I do not update the DNS!

    It is quite simple that way.

    Thanks
     
  6. altaibskt

    altaibskt New Member


    this is the output

     
  7. falko

    falko Super Moderator Howtoforge Staff

    This means you must use 192.168.1.33 for your web sites and your router's public IP for the DNS records.
     
  8. altaibskt

    altaibskt New Member

    thanx for ur reply

    but i didn't get it

    would u please explain more :eek:?
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Your router has a public IP address on the Internet side and a private IP address (probably 192.168.1.1) on your local network side. For the DNS records you must use the public IP.

    When you create a web site in ISPConfig, there's a drop-down menu from which you can select the IP address. You must pick 192.168.1.33 there.
     

Share This Page