{"id":22330,"date":"2018-01-17T12:00:00","date_gmt":"2018-01-17T11:00:00","guid":{"rendered":"https:\/\/www.avanet.com\/kb\/sophos-firewall-dhcp-options-sfos\/"},"modified":"2023-08-13T20:35:38","modified_gmt":"2023-08-13T19:35:38","slug":"sophos-firewall-dhcp-options-sfos","status":"publish","type":"kb","link":"https:\/\/www.avanet.com\/en\/kb\/sophos-firewall-dhcp-options-sfos\/","title":{"rendered":"Sophos Firewall DHCP Options (SFOS)"},"content":{"rendered":"\n<p>In this article, we will show you how to configure DHCP options on a Sophos firewall with the SFOS operating system.<\/p>\n\n<h2 class=\"wp-block-heading\">Update &#8211; March 24, 2022<\/h2>\n\n<p>Since SFOS v18.5 MR3 there are now DHCP options in the GUI. This makes configuration a lot faster and easier.<\/p>\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"2192\" height=\"316\" data-id=\"94634\" src=\"https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui.jpg\" alt=\"\" class=\"wp-image-94634\" srcset=\"https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui.jpg 2192w, https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui-64x9.jpg 64w, https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui-300x43.jpg 300w, https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui-1024x148.jpg 1024w, https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui-768x111.jpg 768w, https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui-1536x221.jpg 1536w, https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui-2048x295.jpg 2048w, https:\/\/www.avanet.com\/assets\/sophos-firewall-dhcp-options-gui-600x86.jpg 600w\" sizes=\"auto, (max-width: 2192px) 100vw, 2192px\" \/><\/a><figcaption class=\"wp-element-caption\">DHCP Options in the Web Admin GUI of 18.5 MR3<\/figcaption><\/figure>\n<\/figure>\n\n<h2 class=\"wp-block-heading\" id=\"h-voraussetzungen\">Requirements<\/h2>\n\n<ul class=\"wp-block-list\">\n<li>Sophos Appliance with SFOS<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\" id=\"h-1-dhcp-server-erstellen\">1. create DHCP server<\/h2>\n\n<p>In order to be able to give DHCP options, you first need a DHCP server, of course. This can be created via the admin interface. Sophos has already explained how to do this in its own knowledge base article:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Sophos Firewall: How to configure the firewall as a DHCP server &#8211; <a href=\"https:\/\/docs.sophos.com\/nsg\/sophos-firewall\/19.0\/Help\/en-us\/webhelp\/onlinehelp\/AdministratorHelp\/Network\/DHCP\/NetworkConfigureDHCPServer\/index.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/community.sophos.com\/kb\/en-us\/123133<\/a><\/li>\n<\/ul>\n\n<p><strong>Important<\/strong>: The DHCP name should not contain spaces or special characters. Use e.g. CamelCase or separate with hyphen (-) or underscore (_).<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"h-2-auf-die-konsole-verbinden\">2. connect to the console<\/h2>\n\n<p>The DHCP options are not found in the WebAdmin GUI. You have to connect to the appliance via SSH to set it. On Windows there is the tool <a href=\"http:\/\/www.putty.org\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">\n  <strong>Putty<\/strong>\n<\/a> and on macOS the already preinstalled <strong>terminal<\/strong> can be used.<\/p>\n\n<ol class=\"wp-block-list\">\n<li>Open the macOS terminal and type <code>ssh admin@192.168.1.1<\/code> into the console. When using Putty, only the IP address needs to be entered. The IP address can of course be different for your firewall. After that, you still need to enter your username and password to log in to your firewall via SSH.<\/li>\n\n\n\n<li>After you are connected, select <strong>4. device console<\/strong> to get to the shell.<\/li>\n<\/ol>\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"635\" data-id=\"15760\" src=\"https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-1024x635.jpg\" alt=\"Sophos Firewall OS Shell Login Overview\" class=\"wp-image-15760\" srcset=\"https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-1024x635.jpg 1024w, https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-64x40.jpg 64w, https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-300x186.jpg 300w, https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-600x372.jpg 600w, https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-768x476.jpg 768w, https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-1536x952.jpg 1536w, https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-2048x1269.jpg 2048w, https:\/\/www.avanet.com\/assets\/sophos-firewall-os-shell-login-overview-18x12.jpg 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/figure>\n\n<h2 class=\"wp-block-heading\">Configure DHCP Option Objects<\/h2>\n\n<p>Sophos has written its own knowledge base article for this, but from our point of view it is not that easy to understand. What we find very useful about this article, however, is the additional information about the DHCP options. That&#8217;s why we&#8217;re linking to Sophos&#8217;s KB post here as a supplement, so you can find the full table with all the options: <a href=\"https:\/\/docs.sophos.com\/nsg\/sophos-firewall\/19.0\/Help\/en-us\/webhelp\/onlinehelp\/AdministratorHelp\/Network\/DHCP\/NetworkDHCPOptionObjects\/index.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/community.sophos.com\/kb\/en-us\/123529<\/a><\/p>\n\n<h3 class=\"wp-block-heading\">Example 1 &#8211; Part 1<\/h3>\n\n<p>For example, do you have the problem that with a Sophos RED 15w at an outdoor location, the integrated access point is not detected? Let&#8217;s take this case as an example and play through how you can create a DHCP option for it.<\/p>\n\n<h4 class=\"wp-block-heading\">Define DHCP option<\/h4>\n\n<p>Before you can fill the option with data, you must first define an option. The command looks like this:<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options add optioncode &lt;Nr&gt; optionname &lt;SAMPLE-NAME&gt; optiontype &lt;TYPE&gt;<\/code><\/pre>\n\n<ul class=\"wp-block-list\">\n<li><strong>Nr<\/strong>: Here you define the option code. There are a total of 255 such option codes. In Sophos <a href=\"https:\/\/docs.sophos.com\/nsg\/sophos-firewall\/19.0\/Help\/en-us\/webhelp\/onlinehelp\/CommandLineHelp\/AppendixA\/index.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">KB post 123529<\/a> you can find the command to print all option codes in the terminal.<\/li>\n\n\n\n<li><strong>SAMPLE-NAME<\/strong>: Here you can enter a name that makes sense to you and describes the option in the most understandable way.<\/li>\n\n\n\n<li><strong>TYPE<\/strong>: Here you define the type that will be needed later for your option. The following types are available: array-of, boolean, four-byte, ipaddress, one-byte, string, two-byte<\/li>\n<\/ul>\n\n<p><strong>Important<\/strong>: In my examples, remove the &lt; and &gt;.<\/p>\n\n<p>The working command for our example now looks like this:<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options add optioncode 234 optionname dhcp_magic_ip optiontype ipaddress<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">Example 1 &#8211; Part 2<\/h3>\n\n<p>Now that the option has been defined, we still give the data with. The command looks like this:<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options binding add dhcpname &lt;DHCP-NAME&gt; optionname &lt;SAMPLE-NAME&gt;<strong>(<\/strong>234<strong>)<\/strong> value &lt;WERT&gt;<\/code><\/pre>\n\n<ul class=\"wp-block-list\">\n<li><strong>DHCP-NAME<\/strong>: Here you enter the name of the DHCP server which you have created via the GUI.<\/li>\n\n\n\n<li><strong>SAMPLE-NAME<\/strong>: Enter the same name as before. The spelling must match exactly.<\/li>\n\n\n\n<li><strong>VALUE<\/strong>: An IP address is expected as a value here. For our RED example, this would be the IP address of the RED 15w at the outdoor location.<\/li>\n<\/ul>\n\n<p>The working command for our example now looks like this:<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options binding add dhcpname dhcp_red_avanet optionname dhcp_magic_ip<strong>(<\/strong>234<strong>)<\/strong> value 10.10.10.12<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">Another example<\/h3>\n\n<p>Now that we have explained which two commands need to be issued, we will show you a few examples to make it easier to create your own Sophos Firewall DHCP Options.<\/p>\n\n<p>With this option you tell a ThinClient on which server the image is located.<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options add optioncode 161 optionname ThinClientServer optiontype ipaddress\nsystem dhcp dhcp-options binding add dhcpname DHCP_Server_Avanet_LAN optionname ThinClientServer<strong>(<\/strong>161<strong>)<\/strong> value '10.10.10.12'<\/code><\/pre>\n\n<p>This command now specifies the port at which the ThinClient can report to the server. Here the optiontype is not <strong>ipaddress<\/strong> but <strong>string<\/strong>. In the best case, the manufacturer of the device will provide you with this information.<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options add optioncode 192 optionname ThinClientServerPort optiontype string\nsystem dhcp dhcp-options binding add dhcpname DHCP_Server_Avanet_LAN optionname ThinClientServerPort<strong>(<\/strong>192<strong>)<\/strong> value '443'<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">Example from Robert: WDS \/ PXE<\/h3>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>The DHCP options can drive you crazy and you can spend hours searching for the right commands. Colleague Robert shares his experience with us here (thank you).<\/p>\n<\/blockquote>\n\n<p><strong>Part 1:<\/strong> One defines what exactly is to be configured:<\/p>\n\n<p>A DHCP option value (IP) should be applied in the internal DHCP scope &#8220;Home_Scope&#8221; which I configured in the GUI. The WDS server listens with me on the IP: 172.16.16.11<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options binding add dhcpname Home_Scope optionname TFTP_Server_Name<strong>(<\/strong>66<strong>)<\/strong> value 172.16.16.11<\/code><\/pre>\n\n<p><strong>Part 2:<\/strong> You define where a client can find the pre-enviroment:<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options binding add dhcpname Home_Scope optionname Bootfile_Name<strong>(<\/strong>67<strong>)<\/strong> value \\boot\\x64\\wdsnbp.com<\/code><\/pre>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>By pre-environment is meant a boot file containing a standard VGA driver, network card drivers, and mouse and keyboard drivers. The Pre-Environment is the window you work with during Windows setup.<\/p>\n<\/blockquote>\n\n<h3 class=\"wp-block-heading\">Delete the option<\/h3>\n\n<p>You may also want to delete such an option again, in which case the command would be as follows:<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options delete optionname dhcp_magic_ip<strong>(<\/strong>234<strong>)<\/strong><\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">Show DHCP options<\/h3>\n\n<p>This command will give you a list of all DHCP options already defined on the Sophos firewall.<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options list<\/code><\/pre>\n\n<h3 class=\"wp-block-heading\">Show DHCP options bindings<\/h3>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options binding show dhcpname &lt;DHCP-NAME&gt;<\/code><\/pre>\n\n<ul class=\"wp-block-list\">\n<li><strong>DHCP-NAME<\/strong>: This is the name of the option you have defined yourself.<\/li>\n<\/ul>\n\n<p>The working command for our example now looks like this:<\/p>\n\n<pre class=\"wp-block-code\"><code>system dhcp dhcp-options binding show dhcpname DHCP_Server_Avanet_LAN<\/code><\/pre>\n","protected":false},"author":5,"featured_media":0,"parent":0,"template":"","format":"standard","kb_kategorie":[382],"class_list":["post-22330","kb","type-kb","status-publish","format-standard","hentry","kb_kategorie-sophos-firewall"],"blocksy_meta":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.avanet.com\/en\/wp-json\/wp\/v2\/kb\/22330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.avanet.com\/en\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.avanet.com\/en\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.avanet.com\/en\/wp-json\/wp\/v2\/users\/5"}],"wp:attachment":[{"href":"https:\/\/www.avanet.com\/en\/wp-json\/wp\/v2\/media?parent=22330"}],"wp:term":[{"taxonomy":"kb_kategorie","embeddable":true,"href":"https:\/\/www.avanet.com\/en\/wp-json\/wp\/v2\/kb_kategorie?post=22330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}