Menu

File /etc/dhcpd.conf

2010-08-11
2012-08-29
  • Francisco Garcia

    Hello!

    I installed phpDHCPAdmin-0.9.5-beta in Centos5.5 and after some problem now it
    works, but when I set it up from the web interface does not change the file
    /etc/dhcpd.conf , but creates a new file dhcpd.conf in another directory.

    What is the relationship between these two files?

    Thanks in advance

     
  • jas

    jas - 2010-08-13

    The default location for the ISC DHCPD service is '/etc/dhcpd.conf'.

    phpDHCPAdmin creates its own dhcpd.conf file within the installation folder.
    (IE /var/www/html/phpDHCPAdmin-0.9.5-beta/conf/dhcpd.conf).

    By using a scheduled task helper we eliminate the need for a permissions
    change prior to restarting the dhcpd service.

     
  • Francisco Garcia

    First thanks for you answer

    Sorry, but I do not understand how this application works

    In centos5.5 I have a dhcp server that works fine, then I would like to use
    phpdhcpadmin to modify server configuration but I cann't. I begin with basic
    configuration, I try add a Pool and show this error: "An error occured while
    validating fields, review details below: Router field is invalid", then I put
    the value 192.168.0.1 but when I try add then shows the same error.

    is it possible don't work in centos5.5?

     
  • jas

    jas - 2010-08-14

    That sounds like a bug.

    You are using 0.9.5-beta right?

    192.168.0.1 is a valid IPv4 address.

    I could not reproduce the error here so I am going to need some more
    information.

    I need to know the contents of a file. The file I need to know about is in the
    'scripts/classes/' folder.

    The file is 'class.validation.php'. On line 99 there is a bit of code
    referring to the ValidateIPv4() function. It should read as follows:

    public function ValidateIPv4( $ip_v4 = NULL )
     {
      $ip_v4 = rtrim( $ip_v4 );
      if( ( eregi( "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$", $ip_v4 ) ) || ( empty( $ip_v4 ) ) ) {
       $data->ip_v4 = 0;
       for( $i = 1; $i <= 3; $i++ ) {
        if( !( substr( $ip_v4, 0, strpos( $ip_v4, "." ) ) >= "0" && substr( $ip_v4, 0, strpos( $ip_v4, "." ) ) <= "255" ) ) {
         $data->ip_v4 = -1;
        }
        $ip_v4 = substr( $ip_v4, strpos( $ip_v4, "." ) + 1 );
       }
       if( !( $ip_v4 >= "0" && $ip_v4 <= "255" ) ) {
        $data->ip_v4 = -1;
       }
    /*
       $octets = explode( ".", $ip_v4 );
       foreach( $octets as $values ) {
        if( ( intval( $values ) > 255 ) || ( intval( $values ) < 0 ) ) {
         $data->ip_v4 = -1;
        }
       }
    */
      } else {
       $data->ip_v4 = -1;
      }
      return $data->ip_v4;
     }
    

    Please verify your matches the code fragment above.

     
  • Francisco Garcia

    Yes I am using 0.9.5-beta

    I think that this error occurs because the "Allow/Deny:" field is assigned to
    the "Router " field.

    When I try add a pool:

    Pool Name: test

    Scope Range Start: 192.168.0.110

    Scope Range End: 192.168.0.120

    DNS Server 1: 80.58.0.33

    DNS Server 2: 80.58.61.250

    Allow/Deny: Deny

    Allow/Deny Option List: Unkown-clients

    show me the next error: "An error occured while validating fields, review
    details below: Router field is invalid"

    then I expand "Need some extra pool options?" and I see "deny" in Router field
    , but if I change the value in "Allow/Deny" to Allow and I press add button
    show me the same error but when I expand "Need some extra pool options?" I see
    "Allow" in Router field

     
  • Francisco Garcia

    I tested this morning the 0.9.5-beta version again and I found because I
    cann't add a pool

    in line 160 of manage.pools.php file there is:

    $router =// $_POST;

    I deleted // , now is $router = $_POST; and add a pool works fine

    after I want to add a subnet with this value

    Subnet Name: net1

    Subnet: 192.168.0.0

    Subnet Mask: 255.255.255.0

    DNS Server 1: 192.168.0.1

    DNS Server 2: 80.58.0.33

    Router: 192.168.0.1

    Scope Range Start: 192.168.0.25

    Scope Range End 192.168.0.50

    and give me other error

    There was a problem inserting the new record.

    Please, do you know why give me this error ?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.