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?

Andrew T.
  • 16,898
  • 10
  • 77
  • 134
ibrahim
  • 21
  • 1
  • 2

1 Answers1

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.

Andrew T.
  • 16,898
  • 10
  • 77
  • 134
Fathur Rohim
  • 111
  • 1