<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div style="" class="">Hello,</div><div style="" class=""><br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">I am two days user of lxc container. Please justify my question accordingly:-) <br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent;
font-style: normal;">My environment is Ubuntu 14.04 (with Virtualbox on Window 7). I am trying to set up an ubuntu container to connect to juniper VPN gateway using msjnc(http://mad-scientist.us/juniper.html).</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">After installed all necessary packages, I can launch "msjnc" and type in the RSA passcode. Then it failed to connect to gateway with errors like:</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color:
transparent; font-style: normal;">==</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">2014-08-28 19:47:52+0000: MadScientist JNC Session Manager 2.5 (17 Feb 2013)<br style="" class="">2014-08-28 19:48:00+0000: Session: connecting using profile x.x.ras.virtela.com user ABC<br style="" class="">2014-08-28 19:48:00+0000: Session: Retrieving certificate from x.ras.virtela.com<br style="" class="">2014-08-28 19:48:01+0000: Writing passwd to child: /home/ubuntu/.juniper_networks/network_connect/ncsvc -h x.ras.virtela.com -u ABC<br style="" class="">-r XXX_RSA -U xxx.ras.virtela.com -f /home/ubuntu/.juniper_networks/.cert.x.ras.virtela.com<br style="" class="">2014-08-28 19:48:01+0000: Running pid 524 in the background<br style="" class="">2014-08-28 19:48:03+0000: Session: PID 524 exited with 65536
(256)<br style="" class="">==</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">Comparing to the regular system, it seems msjnc inside container can't activate additional tun0 interface. So I manually create the tun device below with the same error message.<br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">===</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family:
HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class=""> <em style="" class="">#mknod</em><span class="" style="font-style: italic;"> /dev/net/<em style="" class="">tun</em> c 10 200 <br style="" class=""></span></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span style="" class=""><span class="" style="font-style: italic;"># chmod 666 /dev/net/<em style="" class="">tun</em> </span><br style="" class=""></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">===</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family:
HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">I am using the default container configuration</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">===</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">root@griffinv1:/var/lib/lxc/lxc-u1# more config<br style="" class=""># Template used to create this container: /usr/share/lxc/templates/lxc-download<br style="" class=""># Parameters passed to the template:<br style="" class=""># For additional config options, please look at lxc.container.conf(5)<br style="" class=""><br style="" class=""># Distribution configuration<br style=""
class="">lxc.include = /usr/share/lxc/config/ubuntu.common.conf<br style="" class="">lxc.arch = x86_64<br style="" class=""><br style="" class=""># Container specific configuration<br style="" class="">lxc.rootfs = /var/lib/lxc/lxc-u1/rootfs<br style="" class="">lxc.utsname = lxc-u1<br style="" class=""><br style="" class=""># Network configuration<br style="" class="">lxc.network.type = veth<br style="" class="">lxc.network.flags = up<br style="" class="">lxc.network.link = lxcbr0<br style="" class="">lxc.network.hwaddr = 00:16:3e:43:ad:b3<br style="" class=""><br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">===<br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida
Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">My question is whether it is possible to run VPN client inside container. I also tried the same configuration inside docker container with similar error. It seems tun0 interface can't be brought up inside container.</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">After struggling
for two days, wish someone can shed some light on it.</div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">Thanks,<br></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div class="" style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;">carl<br style="" class=""></div><div class="" style="color: rgb(0, 0,
0); font-size: 13.3333px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br style="" class=""></div></div></body></html>