{"id":199,"date":"2022-10-26T12:53:00","date_gmt":"2022-10-26T12:53:00","guid":{"rendered":"https:\/\/blog.lottabytes.com\/?p=199"},"modified":"2022-10-26T22:54:51","modified_gmt":"2022-10-26T22:54:51","slug":"security-onion-ip-routed-error-on-install","status":"publish","type":"post","link":"https:\/\/blog.lottabytes.com\/index.php\/2022\/10\/26\/security-onion-ip-routed-error-on-install\/","title":{"rendered":"Security Onion &#8211; IP Routed Error on Install"},"content":{"rendered":"\n<p>On my first attempt to install Security Onion in my <a href=\"https:\/\/blog.lottabytes.com\/index.php\/2022\/10\/25\/security-appliance-in-a-box-via-ansible\/\" data-type=\"post\" data-id=\"184\">Security-Appliance-in-a-Box<\/a>, I ran into a weird networking issue.  The install script failed with the error &#8220;<strong>The IP being routed by Linux is not the IP address assigned to the management interface (ens1)<\/strong>&#8220;.  Looking around online, I discovered that I&#8217;m not the first person to experience this, but there wasn&#8217;t an obvious solution.  Here&#8217;s the steps I followed, and the root cause.<\/p>\n\n\n\n<p>Security Onion does work out-of-the-box with dual NICs of the same type.  For example, if I select ens1 and my management interface from the below, no issues.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"336\" src=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-15-25-24.png\" alt=\"\" class=\"wp-image-202\" srcset=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-15-25-24.png 614w, https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-15-25-24-300x164.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><figcaption>Working with dual NICs of same type<\/figcaption><\/figure>\n\n\n\n<p>If I select eth1 from the below options, where ens and eth adapters are mixed, even this will work without an issue.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"333\" src=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-1.png\" alt=\"\" class=\"wp-image-204\" srcset=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-1.png 614w, https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-1-300x163.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><figcaption>Works with dual NICs of different types<\/figcaption><\/figure>\n\n\n\n<p>However, if I attempt to select the below management interface, it will fail.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"333\" src=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-3.png\" alt=\"\" class=\"wp-image-206\" srcset=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-3.png 614w, https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-3-300x163.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><figcaption>Doesn&#8217;t work with reversed order<\/figcaption><\/figure>\n\n\n\n<p>Here&#8217;s the error&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"196\" src=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-4.png\" alt=\"\" class=\"wp-image-207\" srcset=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-4.png 614w, https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-4-300x96.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/figure>\n\n\n\n<p>It appears from looking at the network configuration that both my NICs have an IP address (not surprising).  The management interface (ens1) was correctly configured by the wizard, and my network tap interface has a DHCP address.   <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"829\" height=\"262\" src=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-15-58-08.png\" alt=\"\" class=\"wp-image-209\" srcset=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-15-58-08.png 829w, https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-15-58-08-300x95.png 300w, https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-15-58-08-768x243.png 768w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" \/><figcaption>IP Configuration<\/figcaption><\/figure>\n\n\n\n<p>However, what is surprising is that I&#8217;m getting two default routes set.  One on my management interface (correctly), and one incorrectly applied on my private network for span port traffic.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"101\" src=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-5.png\" alt=\"\" class=\"wp-image-210\" srcset=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-5.png 660w, https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/image-5-300x46.png 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><figcaption>IP Route Configurations<\/figcaption><\/figure>\n\n\n\n<p>The following code is detecting this first line as the default route, when in fact, that record is errant.  Naturally, this record doesn&#8217;t reflect the gateway of my ens1 interface, and thus fails the check.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \/home\/gateway-admin\/SecurityOnion\/setup\/so-functions - line 2446\nMAINIP=$(ip route get 1 | awk '{print $7;exit}')<\/code><\/pre>\n\n\n\n<p>By deleting this errant routing record, you are now able to re-run the so-setup script and it will complete successfully.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"671\" height=\"125\" src=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-16-30-11.png\" alt=\"\" class=\"wp-image-212\" srcset=\"https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-16-30-11.png 671w, https:\/\/blog.lottabytes.com\/wp-content\/uploads\/2022\/10\/Screenshot-from-2022-10-26-16-30-11-300x56.png 300w\" sizes=\"auto, (max-width: 671px) 100vw, 671px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>ip route delete default via 192.168.122.1 dev eth0<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>On my first attempt to install Security Onion in my Security-Appliance-in-a-Box, I ran into a weird networking issue. The install script failed with the error &#8220;The IP being routed by Linux is not the IP address assigned to the management interface (ens1)&#8220;. Looking around online, I discovered that I&#8217;m not the first person to experience &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.lottabytes.com\/index.php\/2022\/10\/26\/security-onion-ip-routed-error-on-install\/\" class=\"more-link\">Read more<span class=\"screen-reader-text\"> &#8220;Security Onion &#8211; IP Routed Error on Install&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[60,57,61,51,62],"class_list":["post-199","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-ip","tag-nids","tag-routed","tag-security-onion","tag-supported-configuration"],"_links":{"self":[{"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/posts\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":5,"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/posts\/199\/revisions"}],"predecessor-version":[{"id":215,"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/posts\/199\/revisions\/215"}],"wp:attachment":[{"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/media?parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/categories?post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lottabytes.com\/index.php\/wp-json\/wp\/v2\/tags?post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}