Access network from within proot?

190 views
Skip to first unread message

almr...@gmail.com

unread,
Mar 31, 2014, 9:28:07 AM3/31/14
to proo...@googlegroups.com
Hi,

I cant get network to run in proot jail.

I have a 3.4 arm kernel (kitkat android with selinux) and I am root.

I start proot with:
./proot-arm -R /data/archlinux/

This happens when I run ping:

[root@localhost ~]# ping
Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
            [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
            [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
            [-w deadline] [-W timeout] [hop1 ...] destination
[root@localhost ~]# ping localhost
socket: Permission denied
[root@localhost ~]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 88  bytes 7232 (7.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 88  bytes 7232 (7.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rmnet0: flags=65<UP,RUNNING>  mtu 1500
        inet 95.192.43.161  netmask 255.255.255.252
        inet6 fe80::8f9c:85ab:8620:d9a8  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 1186972  bytes 1654384568 (1.5 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 626731  bytes 46103048 (43.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Do you have any ideas?

Selinux/bind issue?

No selinux-specific prints are printed in logs...

Regards // Robert

Cédric VINCENT

unread,
Apr 1, 2014, 3:53:28 AM4/1/14
to proo...@googlegroups.com
Hello Robert,

On Mon, Mar 31, 2014 at 3:28 PM, <almr...@gmail.com> wrote:
> Hi,
>
> I cant get network to run in proot jail.
>
> I have a 3.4 arm kernel (kitkat android with selinux) and I am root.
>
> I start proot with:
> ./proot-arm -R /data/archlinux/
>
> This happens when I run ping:
>
> [root@localhost ~]# ping
> Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
> [-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q
> tos]
> [-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
> [-w deadline] [-W timeout] [hop1 ...] destination
> [root@localhost ~]# ping localhost
> socket: Permission denied

This is unexpected, and I can't reproduce this on x86_64. Maybe it's
a PRoot bug on ARM, I'm investigating it. In the mean time, could you
test with another network command (like telnet) ?

Regards,
Cédric.

h hm

unread,
Apr 2, 2014, 1:45:07 AM4/2/14
to proo...@googlegroups.com
This seemed to me to be connected to the fact that ping is a setuid
binary, when I was working with PRoot on android.

Hope that helps! :-)
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "PRoot" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to proot_me+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Cédric VINCENT

unread,
Apr 12, 2014, 7:36:58 AM4/12/14
to proo...@googlegroups.com, almr...@gmail.com
Hello Robert,

On Tue, Apr 1, 2014 at 9:53 AM, Cédric VINCENT <cedric....@gmail.com> wrote:
> In the mean time, could you test with another network command (like telnet) ?

Did you test with another command (like telnet) ? It could help me to
know where this issue comes from.

Regards,
Cédric

Robert Alm

unread,
Apr 12, 2014, 7:42:23 AM4/12/14
to proo...@googlegroups.com, Cédric VINCENT

Hi,

No, sorry did not get around to test... I found what I needed in one of the other threads.. The gnuroot-guy had already done what I wanted to do... So i decided to go with his stuff...;)

Regards // R

Sent from my Sony Xperia™ smartphone



---- Cédric VINCENT wrote ----
Reply all
Reply to author
Forward
0 new messages