Strange internet problems

Ask questions about Arch Linux ARM. Please search before making a new topic.

Strange internet problems

Postby flappix » Wed Dec 12, 2012 3:35 pm

Hi @ all,
I've installed ArchLinxARM on my Toshiba AC100. If I launch wifi-menu or run wpa_supplicant directly, WLAN is working, but only as root. I'm not able to access any web address as normal user, even tough I'm joined the network group.
And there's another strange thing: Accessing a web page in a browser like links or chromium as root works, but I'm not able to use ping or curl. Wget works fine...

Code: Select all
ping google.de
ping: unknown host google.de


If I want to ping my router I get
Code: Select all
ping 192.168.2.1
socket: Permission denied


Any ideas how I could fix that?
An anwer would make me happy :)
flappix
 
Posts: 11
Joined: Fri May 18, 2012 9:45 am

Re: Strange internet problems

Postby dequis » Sun Jan 20, 2013 11:16 pm

Hi there, I was trying to fix this problem myself on my android archarm chroot and found the solution. Turns out that android is more strict on what apps can do with the network, for sandboxing purposes, so there's the kernel setting CONFIG_ANDROID_PARANOID_NETWORK that adds these restrictions.

Basically, the solution is to add these two lines to /etc/group on your archarm.

Code: Select all
inet:x:3003:root
net_raw:x:3004:root


Then, for each user you want to give internet permission:
Code: Select all
gpasswd -a username inet


A full list of UIDs/GIDs can be found here: http://android-dls.com/wiki/index.php?t ... s_and_GIDs

The net_raw permission is for low level connections such as the ping program. On arch it's setuid and setgid root, so it should work out of the box for all other users. On android it's setgid net_raw, which works too.

It works perfectly for me for both root and users, but a friend told me he couldn't manage to ping from unprivileged users no matter what kind of setuid/setgid/groups setup. Not really a big issue so we've given up on it.
dequis
 
Posts: 1
Joined: Sun Jan 20, 2013 9:45 pm

Re: Strange internet problems

Postby flappix » Tue Jan 22, 2013 5:56 pm

It works, thank you so much!
I thought I have to use root for my internet applications until the end of my days :)
flappix
 
Posts: 11
Joined: Fri May 18, 2012 9:45 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 2 guests