{"id":254,"date":"2017-01-02T16:36:56","date_gmt":"2017-01-02T18:36:56","guid":{"rendered":"http:\/\/portal.venidera.com\/kb\/?p=254"},"modified":"2017-01-10T17:00:37","modified_gmt":"2017-01-10T19:00:37","slug":"english-solving-lxc-containers-issues-related-to-tlssslhttps","status":"publish","type":"post","link":"https:\/\/portal.venidera.com\/kb\/2017\/01\/02\/english-solving-lxc-containers-issues-related-to-tlssslhttps\/","title":{"rendered":"(English) Solving LXC containers issues related to TLS\/SSL\/HTTPS"},"content":{"rendered":"<p class=\"qtranxs-available-languages-message qtranxs-available-languages-message-pb\">Desculpe-nos, mas este texto est\u00e1 apenas dispon\u00edvel em <a href=\"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/posts\/254?lang=en\" class=\"qtranxs-available-language-link qtranxs-available-language-link-en\" title=\"English\">English<\/a>. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.<\/p><p>When you are inside a LXC container you can experience errors (more like a freeze) when you try to access the virtual network (veth) using crypto resources like wget, ssh and other (so, maven will fail, git will fail and other apps that uses TLS and SSL). This is a mtu issue. You must to set the MTU of the eth0 (veth inside the container) with the same value of the bridge MTU.<br \/>\nSo, outside of the container do:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ ifconfig lxcbr0\r\nlxcbr0: flags=4419&lt;UP,BROADCAST,RUNNING,PROMISC,MULTICAST&gt;  mtu 1400\r\n        ...\r\n<\/pre>\n<p>So, we can see that the value for the bridge mtu is 1400.<br \/>\nNow, inside the container we have:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# lxc-attach -n container-name -- ifconfig eth0\r\neth0      Link encap:Ethernet  HWaddr 42:05:9d:51:4c:d6  \r\n          inet addr:192.168.30.83  Bcast:192.168.30.255  Mask:255.255.255.0\r\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\r\n          ...\r\n<\/pre>\n<p>You can change the value in runtime to match the bridge (in this case 1400) using:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# lxc-attach -n container-name -- ifconfig eth0 mtu 1400\r\n# lxc-attach -n container-name -- ifconfig eth0\r\neth0      Link encap:Ethernet  HWaddr 42:05:9d:51:4c:d6  \r\n          inet addr:192.168.30.83  Bcast:192.168.30.255  Mask:255.255.255.0\r\n          UP BROADCAST RUNNING MULTICAST  MTU:1400  Metric:1\r\n          ...\r\n<\/pre>\n<p>This also can be defined in the config file for a container (example: \/var\/lib\/lxc\/container-name\/config), you just have to add:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nlxc.network.mtu=1400\r\n<\/pre>\n<p>You can define as default for new containers adding this to the file \/etc\/lxc\/default.conf<br \/>\n<\/p>","protected":false},"excerpt":{"rendered":"<p>Desculpe-nos, mas este texto est\u00e1 apenas dispon\u00edvel em English. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.When you are inside a LXC container you can experience errors (more like a freeze) when you try to access the virtual  [&#8230;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-infra"],"_links":{"self":[{"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":3,"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/posts\/254\/revisions\/261"}],"wp:attachment":[{"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/portal.venidera.com\/kb\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}