ispCP - Board - Support
Private IP Address - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: Private IP Address (/thread-8846.html)



Private IP Address - Macsloverd - 12-21-2009 07:15 AM

I have been using IspCP for several months and it is great.

last week I tried to install IspCP on a server which has a private IP address like 192.168.1.1 and it seems not working properlly.

Here is my network structure:

ADSL (20MB)
|
Modem/Router (Public IP address, DMZ pointed to IspCP Server)
|
IspCP Server (Private IP address)

TLDs are all directed to the Public IP address

I can visit the control pannel by using the the TLD, and setting up Virtual Hosts, however, it shows no file after uploading the site to the VH.

Does IspCP support this type of network structure? if so can anyone tell me how to configure it in order to use with this type of stucture?

Thanks in advance.


RE: Private IP Address - kilburn - 12-21-2009 07:36 AM

(12-21-2009 07:15 AM)Macsloverd Wrote:  Does IspCP support this type of network structure? if so can anyone tell me how to configure it in order to use with this type of stucture?

No, it doesn't. Basically, this setup would require the DNS service to announce a different IP than the one used in all other configurations. As ispcp is not handling this situation, you'll have to manage your domains' DNS service externally. As long as you create the proper records for them, everything else will work properly Smile


RE: Private IP Address - motokochan - 12-21-2009 07:45 AM

You actually can set it up to "work", but it does break a few things like the system status page. I've managed this configuration for a customer.

If you are interested in the steps to do this, let me know and I'll draft up something here and maybe refine it for the Documentation.


RE: Private IP Address - Macsloverd - 12-21-2009 08:00 AM

(12-21-2009 07:36 AM)kilburn Wrote:  
(12-21-2009 07:15 AM)Macsloverd Wrote:  Does IspCP support this type of network structure? if so can anyone tell me how to configure it in order to use with this type of stucture?

No, it doesn't. Basically, this setup would require the DNS service to announce a different IP than the one used in all other configurations. As ispcp is not handling this situation, you'll have to manage your domains' DNS service externally. As long as you create the proper records for them, everything else will work properly Smile

Thanks! and actually I do manage the DNS record externally, though the Bind server is running. So the DNS is not quite a issue.
(12-21-2009 07:45 AM)motokochan Wrote:  You actually can set it up to "work", but it does break a few things like the system status page. I've managed this configuration for a customer.

If you are interested in the steps to do this, let me know and I'll draft up something here and maybe refine it for the Documentation.

Great! I really appreciate that!

Well, just in case, I don't need the Bind9 DNS service since I always use an external DNS server.

Your reply saves my life!

Thanks a lot!


RE: Private IP Address - motokochan - 12-21-2009 08:10 AM

First, stop ispcp_daemon while you make these edits.

Next, you'll need to edit a few templates to remove references to the internal IP.

Specifically, edit:
/etc/ispcp/apache/parts/als_entry.tpl
/etc/ispcp/apache/parts/dmn_entry.tpl
/etc/ispcp/apache/parts/sub_entry.tpl
/etc/ispcp/apache/parts/vh_entry.tpl

For the first three, find the VirtualHost header, and change the {whatever_IP}:80 to read *:80. For the fourth file, Find the NameVirtualHost line, and set {IP}:80 to *:80.

Now, follow the directions in Howto regenerate the config files.

This should allow your websites to be accessed on any IP that is bound on the box, instead of by the internal IP only.

As a note, you'll get lots of Apache warnings when you start or restart the service (one warning per site) because of duplicated directives since we wildcarded the IP. This is fine and won't break anything. Fixing those would take a lot more work and I'd rather focus on building proper NAT support into the application.