{"id":109,"date":"2021-09-20T02:38:44","date_gmt":"2021-09-20T07:38:44","guid":{"rendered":"https:\/\/sourceopen.com\/?p=109"},"modified":"2021-09-20T02:43:28","modified_gmt":"2021-09-20T07:43:28","slug":"broken-ipv6-on-freebsd-or-mtr-unexpected-mtr-packet-error-with-ipv6-on-freebsd-13-or-other-bsd-systems","status":"publish","type":"post","link":"https:\/\/sourceopen.com\/index.php\/broken-ipv6-on-freebsd-or-mtr-unexpected-mtr-packet-error-with-ipv6-on-freebsd-13-or-other-bsd-systems\/","title":{"rendered":"Broken IPv6  on FreeBSD or mtr: Unexpected mtr-packet error with IPv6 on FreeBSD 13, or Other BSD Systems"},"content":{"rendered":"\n<p>This error could be caused by a number of things, but in my case it was a simple error in my <em>ipfw <\/em>rules. My FreeBSD 13 box would work perfectly for IPv4, but fail with this error for IPv6. IPv6 was broken completely for this FreeBSD 13 machine.<\/p>\n\n\n\n<p>It turns out that I had forgotten to allow ICMP for IPv6 in the <em>ipfw <\/em>firewall.<\/p>\n\n\n\n<p>Although IPv4 uses ARP to find out which MAC address belongs to a certain IP address. IPv6 instead uses <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/IPv6_Neighbor_Discovery\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/IPv6_Neighbor_Discovery\" target=\"_blank\">IPv6 Neighbor Discovery<\/a>. This works via IPv6 ICMP. Also, <em>mtr<\/em> likes the IPv6 ICMP available as well&#8230;<\/p>\n\n\n\n<p>So in order to fix this you have to be sure to pass IPv6 ICMP with <em>ipfw <\/em>(or <em>pf <\/em>for that matter, but I don&#8217;t have that syntax handy&#8211; but now you know what the problem is you should be able to find it on DuckDuckGo, or that EVIL search engine).<\/p>\n\n\n\n<p>So edit your <em>ipfw <\/em>rules, wherever they, are and include a line to pass the IPv6 ICMP:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$IPF 95 allow icmp6 from any to any<\/pre>\n\n\n\n<p>In my case $IPF is a variable set to IPF=&#8221;ipfw -q add&#8221; at the top of the <em>ipfw <\/em>script. Look at your script and see how your rules are configured and replace $IPF with whatever your script is using to call ipfw add. If this doesn&#8217;t make any sense to you then just copy one of the rule you have and modify only the latter part to match the above. I have faith you can figure out how to make it work!<\/p>\n\n\n\n<p>The constant number 95 in my example is the rule number in my file&#8211; You will want to set this for your setup.<\/p>\n\n\n\n<p>So this is at least one way of how to fix the broken IPv6 on FreeBSD, or how to fix <em>mtr<\/em>: Unexpected mtr-packet error with IPv6 on FreeBSD 13. Note I have also seen the <em>mtr <\/em>packet error on systems before they are fully booted. So if I <em>mtr <\/em>to a host that is in the boot up process I will occasionally get this error as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This error could be caused by a number of things, but in my case it was a simple error in my ipfw rules. My FreeBSD 13 box would work perfectly for IPv4, but fail with this error for IPv6. IPv6 &hellip; <a href=\"https:\/\/sourceopen.com\/index.php\/broken-ipv6-on-freebsd-or-mtr-unexpected-mtr-packet-error-with-ipv6-on-freebsd-13-or-other-bsd-systems\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[3,4,79,99,5,96,97],"_links":{"self":[{"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/posts\/109"}],"collection":[{"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":1,"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/posts\/109\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sourceopen.com\/index.php\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}