Issue with Multi Server Setup using 1 Public IP

Discussion in 'Installation/Configuration' started by Renjith, Feb 14, 2017.

  1. Renjith

    Renjith New Member

    Hi
    I have 4 servers sitting at the back of a netgear wireless router. The servers are setup as below:
    First server : 192.168.2.1 (cpanel.example.tld)
    Second server : 192.168.2.2 (ns1.example.tld)
    Third server : 192.168.2.3 (web.example.tld)
    Fourth server : 192.168.2.4 (mail.example.tld)

    My ISP has issued me with a static ip. I followed the multiserver setup guide at howtoforge. the second, third and forth server has been added to the first server as furnished in the guide.

    But when i try to create a site, while selecting the server the ip shows as 192.168.2.3 for web.example.tld instead of my public ip.

    Can anyone help me on this matter?
     
  2. Jesse Norell

    Jesse Norell Well-Known Member

    You configure that under System > Server IPv4 mapping (and should be explained in the ispconfig manual).
     
  3. Renjith

    Renjith New Member

    Hi Jesse,
    I tried to do that. But i can only map one internal server to an external ip. I have only one public IP issued by my ISP.
     
  4. Renjith

    Renjith New Member

    i can only map my external ip to any one of my cluster (for example: db.example.com or ns1.example.com, etc). Can anyone out there help me with this issue?:)
     
  5. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    you can nat the traffic based on the port. ie. 80,443, 21 to the private-webip or 53 tcp+upd to dns-server
     
    proslide likes this.
  6. Renjith

    Renjith New Member

    Hi florian,

    I have tried that.. But the internal servers still show local ip instead of public ip. I have been issued only one public ip? Any ideas..?
     
  7. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    You can not use the public on servers with a private ip only

    public-ip -> nat -> private-ip
    private-ip -> nat -> public-ip
     
    proslide likes this.
  8. Renjith

    Renjith New Member

    Hi Florian,


    Thank you for your reply.
    I have 4 lan ip addresses which has been assigned to my servers.
    server.example.com - 192.168.2.1
    db.example.com - 192.168.2.2
    ns1.example.com - 192.168.2.3

    My ISP has issued me with one public ip which is x.x.x.x. I know NAT can only map an internal ip to an external ip and vice versa.
    But when i have my customers logging into the control panel to add new websites, they see the lan ip of the servers rather than the public ip.

    Is there any way to achieve this using IPV4 mapping or any other function?
     
  9. proslide

    proslide New Member HowtoForge Supporter

    Hi Renjith,
    You can't use/configure/see the Public IP on the real server, because you use Private IP on server configurations.
    You can order new IPv4 Public Address Pool and you ISP will route this pool to you static IP. Then you will be able to configure Secondary Address on the LAN Interface of your Router with public pool and the same configuration on the servers.
    And you must ensure that your Router support this configuration (secondary IP on the interface, work without NAT for chosen network)
    Good Luck
     

Share This Page