How can i determine, which IP is not used?

Discussion in 'General' started by vogelor, Jan 2, 2007.

  1. vogelor

    vogelor New Member

    I have a web with 127 IP's (registered at the RIPE). This means, my server can have 127 IP's (i know ~124...).
    i now entered all IP's into the server. if i now create a new web, how can i see, which IP is already used ant which is not?
    (if i set the same IP to 2 webs, SSL will not work anymore and there are still more errors, so i have to avoid this under all circumstances!)

    Thanks for ur help!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no list of used IP addresses in ISPConfig, but if you enable SSL for every website, ISPConfig will warn you if the IP is already in use. The only other solution is to search the isp_isp_web database for the IP manually.
     
  3. vogelor

    vogelor New Member

    changing the source

    OK - what about this?
    i am programming PHP since many years and think, i can "help you" and change the source-code of the page "ISP Web". I can scan the table for every IP already used and add a "(used)" after the ip in the dropdown-list (in the VISIBLE drop-down-list, NOT in the IP the form posts itself.)
    If you tell me, where to find the section to patch i can do it and send the patch to you - no problem.

    what do you think about this?

    Olli
     
  4. Hans

    Hans Moderator Moderator

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I think thats a good idea. The only problem that I see currently is that the dropdown list is automatically filled by a function that fills all dropdown lists, so it is not possible to add a "used" after the IP addresses.

    The only workarounfd that I see currently is:

    1) add a column like title or name to the table isp_server_ip, this column contains either the IP address or the IP address plus the word used.

    2) Change the value of the ID field in the form designer for the field web_ip in the web form to the name of the newly created table column.

    3) Add code to the isp_server update function (and maybe the installer) to fill the new column with the IP addrsses and add code to the update function of the websites to add a used to the IP name when a web with this IP is created.

    Any comments?
     
  6. vogelor

    vogelor New Member

    had the same idea

    thats amazing!
    i actually had a look at the source and at the form designer at came to exact the same resolution that you!

    i think, i can change this and send you the patch by email. To which email-adress?

    Olli
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Please send patches to dev [at] ispconfig [dot] org, if you want to get SVN access, please write a email to the same email address. But emailing patches is fine too :)

    One additional idea, maybe its better to use a word like "shared" then the word "used" for the IP addresses that are already assigned to another website, otherwise some poeple might think that they can not reuse the same IP for a non SSL website.
     
  8. vogelor

    vogelor New Member

    i thought the same but: sorry, i don't agree.
    In Plesk for example there are two tyes of IP's, exclusive and shared. exclusive IP's can have 0-1 webs and shared can have 0-... websites. what about showing how much an IP is used (for example "10.0.0.2 (0) \ 10.0.0.3 (5) \ 10.0.0.4 (1) and so on (\ = [newline])?

    if i write only shared one may think, this ip can used shared but is NOT used
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I think that displaying the number is a good and clear solution.
     

Share This Page