Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DHCP Options in 9.204-20

I was wondering if anyone else has run into this. I can't seem to add any DHCPv4 options to the firewall. Every time I add an option i get the following error message.

The DHCPv4 option object requires a number for the integer value attribute

Except the option value i am adding in this case is not an integer (ie: filename) I get the same error when using next-server.

Any assistance would be greatly appreciated.


This thread was automatically locked due to age.
Parents
  • Don't forget to open a support case if you have support and share "offical" workarounds and expected resolution times.

    Consider getting problems that impact you documented, confirmed and periodically reviewing them outside the technical support channel. 

    Create new boot-file object:
    cc set_object "{ 'class' => 'dhcp', 'data' => { 'address' => '', 'code' => -2, 'comment' => 'TFTP bootfile from command line', 'dhcp_name' => 'filename', 'host' => [], 'integer' => 0, 'mac' => '', 'scope' => 'global', 'server' => [], 'status' => 0, 'string' => '', 'text' => 'pxelinux.0', 'type' => 'text', 'vendor' => '' }, 'type' => 'option' }"


    Create new next-server DHCP object for target address in object REF_NetHosBogusAddre:
    cc set_object "{ 'class' => 'dhcp', 'data' => { 'address' => 'REF_NetHosBogusAddre', 'code' => -1, 'comment' => 'TFTP server from command line', 'dhcp_name' => 'next-server', 'host' => [], 'integer' => 0, 'mac' => '', 'scope' => 'global', 'server' => [], 'status' => 0, 'string' => '', 'text' => '', 'type' => 'ip-address', 'vendor' => '' }, 'type' => 'option' }"


    Show host object information for a particular IP, 192.0.2.5:
    cc get_objects_filtered '$_->{class} eq "network" && $_->{type} eq "host" && $_->{data}->{address} eq "192.0.2.5"' 


    Show dhcp option objects:
    cc get_objects_filtered '$_->{class} eq "dhcp" && $_->{type} eq "option"'


    If you need other dhcp options it might be best to build a 9.2 box that isn't broken then make the desired objects via webadmin and use the information above to create/build the objects via cc.
Reply
  • Don't forget to open a support case if you have support and share "offical" workarounds and expected resolution times.

    Consider getting problems that impact you documented, confirmed and periodically reviewing them outside the technical support channel. 

    Create new boot-file object:
    cc set_object "{ 'class' => 'dhcp', 'data' => { 'address' => '', 'code' => -2, 'comment' => 'TFTP bootfile from command line', 'dhcp_name' => 'filename', 'host' => [], 'integer' => 0, 'mac' => '', 'scope' => 'global', 'server' => [], 'status' => 0, 'string' => '', 'text' => 'pxelinux.0', 'type' => 'text', 'vendor' => '' }, 'type' => 'option' }"


    Create new next-server DHCP object for target address in object REF_NetHosBogusAddre:
    cc set_object "{ 'class' => 'dhcp', 'data' => { 'address' => 'REF_NetHosBogusAddre', 'code' => -1, 'comment' => 'TFTP server from command line', 'dhcp_name' => 'next-server', 'host' => [], 'integer' => 0, 'mac' => '', 'scope' => 'global', 'server' => [], 'status' => 0, 'string' => '', 'text' => '', 'type' => 'ip-address', 'vendor' => '' }, 'type' => 'option' }"


    Show host object information for a particular IP, 192.0.2.5:
    cc get_objects_filtered '$_->{class} eq "network" && $_->{type} eq "host" && $_->{data}->{address} eq "192.0.2.5"' 


    Show dhcp option objects:
    cc get_objects_filtered '$_->{class} eq "dhcp" && $_->{type} eq "option"'


    If you need other dhcp options it might be best to build a 9.2 box that isn't broken then make the desired objects via webadmin and use the information above to create/build the objects via cc.
Children
  • Another option is to edit "/var/chroot-dhcps/etc/dhcpd.conf" and restart the DHCP server with "/var/mdw/scripts/dhcpd restart".  The conf file is subject to regeneration so make sure you keep backups.

    I added a slash to help with the grammar:
    If you need other dhcp options it might be best to build a 9.2 box that isn't broken then make the desired objects via webadmin and use the information above to create/build the objects via cc.


    A bit more step by step:

    • Build a test UTM with a version where DHCP/WebAdmin isn't broken.  (Is 9.203 the last version that "worked"?  I don't know.)
    • Create your desired DHCP options via WebAdmin
    • View the DHCP objects and data from the command line: 
      cc get_objects_filtered '$_->{class} eq "dhcp" && $_->{type} eq "option"'

    • Copy and paste the right parts to plug the data into 9.204 via cc, something like:
      cc set_object "{ 'class' => 'dhcp', 'data' => { 'address' => '', 'code' => -2, 'comment' => 'TFTP bootfile from command line', 'dhcp_name' => 'filename', 'host' => [], 'integer' => 0, 'mac' => '', 'scope' => 'global', 'server' => [], 'status' => 0, 'string' => '', 'text' => 'pxelinux.0', 'type' => 'text', 'vendor' => '' }, 'type' => 'option' }"



    In addition to changes you'll likely need to add/remove sections, cc/confd-client.plx will generally suggest what you are doing wrong if it doesn't like the format/data.

    Please share any cc/data formatting you come to understand.
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?