# [Information Request] How does the new aliendalvik have internet access

Does anyone know how the new aliendalvik has networking access? I am trying to get archlinux to run in a container, and cannot figure out how to allow it to access the network.

lxc-net does not even seem to create a network device (checked with ifconfig) even after adding the relevant configuration to /etc/default/lxc-net, and trying to start a container with a lxc bridge enabled prevents it from starting.

Anything even remotely related to networking doesn't exist on Sailfish OS, and as it turns out even stopping lxc-net does not cause android applications to lose internet access, so it's not that.

So how on earth does aliendalvik have internet access? Even better, how could I give another container internet access too?

edit retag close delete

its a good question of which i dont know the answer, but what i can say is that in sfos, theres connman handling all the network traffic. its probably talking to it via some unix domain socket.

( 2019-05-19 23:31:10 +0300 )edit

If only Jolla would shed some light on this :) I'd really love to be able to have arch run in background, and eventually have desktop shortcuts to launch certain applications (like chromium) seamlessly, kinda how you can launch android apps :D

( 2019-05-20 00:51:28 +0300 )edit

Sort by » oldest newest most voted

In short: aliendalvik just uses the hosts network interfaces.

If you have a look at /var/lib/lxc/aliendalvik/config you'll find the line:

lxc.net.0.type = none


According to the lxc.container.conf manpage this means:

none: will cause the container to share the host's network namespace. This means
the host network devices are usable in the container. It also means that if both
the container and host have upstart as init, 'halt' in a container (for instance)
will shut down the host.

more

Thank you so much, I don't think I would have ever figured this out. I automatically assumed that none means no networking at all, it did not even occur to me to check whether it could mean something else.

( 2019-05-20 06:01:03 +0300 )edit

Try adding users that need internet to inet group, it may help. I can't tell if you need to sync uids/guids inside and outside of container though. You can also try using chroot instead of containerization. I have debian running in chroot, it works.

more

Thanks, unfortunately arch doesn't seem to have inet. I actually tried it with a chroot before switching to LXC (manually mounting stuff seemed so messy). Unfortunately no matter what I do, I cannot get it set up in such a way that non-root users can access the internet. Although I am not a big fan of it personally (for subjective reasons), I may have to try debian (or ubuntu, since that's somewhat similar) instead of arch.

( 2019-05-20 06:13:20 +0300 )edit

thanks for the inet tip. Making a new group called inet, giving it the same ID as the SFOS group by the same name and adding my chroot-ed user to it seems to have made the internet miraculously work for non-root users :D

( 2019-05-20 07:15:16 +0300 )edit