Adding DHCP Options to Sophos Firewall

Update: v19 and up brings GUI settings for DHCP options via the DHCP servers menu. Use that. For the many of you still stuck in the v17.5 or 18 dark ages, this is for you.

There are no GUI options for adding DHCP Options to Sophos Firewall. The firewall supports DHCP options only through it’s CLI. DHCP options are additional network settings passed down to a client device – often this can include configuration for lightweight network devices such as VoIP handsets, wireless access points, and even network appliances.

To use these commands, log into the device via SSH or console. Select option 4 for Device console.

Commands

List available DHCP Options on Sophos Firewall

SSH Config
system dhcp dhcp-options show

Note: Although the firewall lists options 1 through 76, it supports all as defined in the RFC. Full list below.

Create a DHCP Option

It is unclear from the documentation when DHCP Options must be created, but at a guess, it only needs to be “created” if the DHCP option is not visible in the above show command. I’ve never had to use it, however, it is included in the Sophos documentation.

SSH Config
system dhcp dhcp-options add optioncode [optioncode] optionname [optionname] optiontype [optiontype]
  • optioncode: this is the DHCP option number (e.g. option 66)
  • optionname: an arbitrary name
  • optiontype: the type of data stored in the option – possible values are: string | ipaddress | and some other values there is no documentation on. String is most common in my experience.

Adding/Binding a DHCP Option to a DHCP Server

SSH Config
system dhcp dhcp-options binding add dhcpname [DHCPservername] optionname [Optionname] [value]
  • DHCPservername = this is the name of the dhcp server you are binding to (e.g. Default_DHCP_Server)
Sophos Firewall DHCP Server settings.
The “Name” field is the DHCP Server Name.
  • optionname: The optionname, either set when creating the dhcp option, or found in the list of available options. (For example, TFTP_Server_Name)
  • value: the value of the DHCP option you are adding – for strings, this must be in single quotes (‘google.com’) for ipaddresses this should be plain (192.168.1.21)

Unbind a DHCP Option from a DHCP Server

system dhcp dhcp-options binding delete dhcpname [DHCPservername] optionname [optionname]
  • DHCPservername: same as previous
  • Optionname: same as previous

Delete a DHCP Option

system dhcp dhcp-options delete optioncode [optioncode] optionname [optionname]

Available DHCP Options

These tables are directly from Sophos’ documentation. You can find the original version here.

Sophos Firewall Supported DHCP Options IPv4

Option NumberNameDescriptionData Type
2Time offsetTime offset in seconds from UTCFour-byte numeric value
4Time serversN/4 time server addressesArray of IP addresses
5Name serversN/4 IEN-116 server addressesArray of IP addresses
7Log serversN/4 logging server addressesArray of IP addresses
8Cookie serversN/4 quote server addressesArray of IP addresses
9LPR serversN/4 printer server addressesArray of IP addresses
10Impress serversN/4 impress server addressesArray of IP addresses
11RLP serversN/4 RLP server addressesArray of IP addresses
12Host nameHostname stringString
13Boot file sizeSize of boot file in 512 byte chunksTwo-byte numeric Value
14Merit dump fileClient to dump and name of file to dump toString
16Swap serverSwap server addressesIP address
17Root pathPath name for root diskString
18Extension filePatch name for more BOOTP infoString
19IP layer forwardingEnable or disable IP forwardingBoolean
20Src route enablerEnable or disable source routingBoolean
22Maximum DG reassembly sizeMaximum datagram reassembly sizeTwo-byte numeric value
23Default IP TTLDefault IP time-to-liveOne-byte numeric value
24Path MTU aging timeoutPath MTU aging timeoutFour-byte numeric value
25MTU plateauPath MTU plateau tableArray of two-byte numeric values
26Interface MTU SizeInterface MTU sizeTwo-byte numeric value
27All subnets are localAll subnets are localBoolean
28Broadcast addressBroadcast addressIP address
29Perform mask discoveryPerform mask discoveryBoolean
30Provide mask to othersProvide mask to othersBoolean
31Perform router discoveryPerform router discoveryBoolean
32Router solicitation addressRouter solicitation addressIP address
34Trailer encapsulationTrailer encapsulationBoolean
35ARP cache timeoutARP cache timeoutFour-byte numeric value
36Ethernet encapsulationEthernet encapsulationBoolean
37Default TCP TTLDefault TCP TTLOne-byte numeric value
38TCP keepalive intervalTCP keepalive intervalFour-byte numeric value
39TCP keepalive garbageTCP keepalive garbageBoolean
40NIS domain nameNIS domain nameString
41NIS server addressesNIS server addressesArray of IP addresses
42NTP servers addressesNTP servers addressesArray of IP addresses
43Vendor specific informationVendor specific informationString
45NetBIOS datagram distributionNetBIOS datagram distributionArray of IP addresses
46NetBIOS node typeNetBIOS node typeOne-byte numeric Value
47NetBIOS scopeNetBIOS scopeString
48X window font serverX window font serverArray of IP addresses
49X window display managerX window display managerArray of IP addresses
50Requested IP addressRequested IP addressIP addresses
51IP address lease timeIP address lease timeFour-byte numeric value
52Option overloadOverload “sname” or “file”One-byte numeric value
53DHCP message typeDHCP message typeOne-byte numeric value
55Parameter Request ListParameter request listArray of one-byte numeric values
56MessageDHCP error messageString
57DHCP maximum message sizeDHCP maximum message sizeTwo-byte numeric value
58Renew time valueDHCP renewal (T1) timeFour-byte numeric value
59Rebinding time valueDHCP rebinding (T2) timeFour-byte numeric value
60Client identifierClient identifierString
61Client identifierClient identifierString
62Netware/IP domain nameNetware/IP domain nameString
64NIS+ V3 client domain nameNIS+ V3 client domain nameString
65NIS+ V3 server addressNIS+ V3 server addressArray of IP addresses
66TFTP server nameTFTP server nameString
67Boot file nameBoot file nameString
68Home agent addressesHome agent addressesArray of IP addresses
69Simple mail server addressesSimple mail server addressesArray of IP addresses
70Post office server addressesPost office server addressesArray of IP addresses
71Network news server addressesNetwork news server addressesArray of IP addresses
72WWW server addressesWWW server addressesArray of IP addresses
73Finger server addressesFinger server addressesArray of IP addresses
74Chat server addressesChat server addressesArray of IP addresses
75StreetTalk server addressesStreetTalk server addressesArray of IP addresses
76StreetTalk directory assistance addressesStreetTalk directory assistance addressesArray of IP addresses
120SIP serverThe SIP server DHCP option carries a 32-bit (binary) IPv4 address used by the SIP client to locate a SIP server.Array of IP addresses
IPv4 DHCP Options supported by Sophos Firewall

Sophos Firewall Supported DHCP Options IPv6

Option NumberNameDescriptionData Type
21SIP servers namesThe domain names of the SIP outbound proxy servers for the client to useAlphanumeric text with/without quotes
22SIP servers addressesSpecifies a list of IPv6 addresses indicating SIP outbound proxy servers available to the clientAlphanumeric text with/without quotes
24Domain searchSpecifies the domain search list the client is to use when resolving hostnames with DNSAlphanumeric text with/without quotes
27NIS serversProvides a list of one or more IPv6 addresses of NIS servers available to the clientAlphanumeric text with/without quotes
28NISP serversProvides a list of one or more IPv6 addresses of NIS+ servers available to the clientAlphanumeric text with/without quotes
29NIS domain nameUsed by the server to convey client’s NIS Domain Name info to the clientAlphanumeric text with/without quotes
30NISP domain nameUsed by the server to convey client’s NIS+ Domain Name info to the clientAlphanumeric text with/without quotes
31SNTP serversProvides a list of one or more IPv6 addresses of SNTP servers available to the client for synchronizationAlphanumeric text with/without quotes
32INFO refresh timeSpecifies an upper bound for how long a client should wait before refreshing information retrieved from DHCPv6Alphanumeric text with/without quotes
33BCMS server DBroadcast and Multicast service controller domain name list option for DHCPv6Alphanumeric text with/without quotes
34BCM server ABroadcast and Multicast service controller IPv6 address option for DHCPv6Alphanumeric text with/without quotes

Useful Reference & PDF versions:

https://docs.sophos.com/nsg/sophos-firewall/18.5/Help/en-us/webhelp/onlinehelp/AdministratorHelp/Network/DHCP/NetworkDHCPOptionObjects/index.html#sip-server-and-phones

https://support.sophos.com/support/s/article/KB-000035918?language=en_US

https://docs.sophos.com/nsg/sophos-firewall/18.5/Help/en-us/webhelp/onlinehelp/CommandLineHelp/DeviceConsole/SystemCommands/index.html#dhcp

(Written as of SFOS 18.5.2 MR2/Tested on Sophos Firewall XG 210)

Leave a Reply

Your email address will not be published. Required fields are marked *