2

In Linux, we can

# echo 1 > /proc/sys/net/ipv4/ip_forward

or

# sysctl -w net.ipv4.ip_forward=1

There is no sysctl command nor /proc/sys/net/ipv4/ip_forward file in Android.

Is there an equivalent operation in Android?

1
  • 5
    Which Android version are you using? My Android 4.2.1 has that file. sysctl can be obtained by installing Busybox.
    – Firelord
    Commented Dec 9, 2015 at 15:09

1 Answer 1

1

This method worked for me, I just set up Android as a proxy server and need to enable forwarding.

Use ROOT Explorer and EDIT this file: /proc/sys/net/ipv4/ip_forward

Add this syntax:

iptables -F -t filter
iptables -P FORWARD ACCEPT 

If that file is not found, try installing Busybox first, but I guess that file by default is available on the Android system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .