I have afwall configured to use the built-in iptables binary and I am trying to perform port forwarding using the custom script function. Here is the entire script:
The idea is that any DHCP traffic coming from interface ncm0 should be port forwarded to 6700 so that an Android application listening on that port can intercept DHCP DISCOVERY requests (UDP broadcast). These rules appear at startup so it appears that afwall is executing the script.
I have the script installed at /data/local/afwall/afwall.sh, the group/owner is shell, with 755 permissions.
Any ideas on why the Android application can't receive traffic? The application receives the traffic if it comes in on port 6700, but the redirection from 67 to 6700 does not appear to work.
Should I look into using the "afwall-x" chain(s)? If that's part of the solution, do I need to do something about ncm0? Most AOSP devices do not have this interface by default, I am enabling it via superuser shell execution via the Android USB gadget driver:
I have afwall configured to use the built-in iptables binary and I am trying to perform port forwarding using the custom script function. Here is the entire script:
The idea is that any DHCP traffic coming from interface ncm0 should be port forwarded to 6700 so that an Android application listening on that port can intercept DHCP DISCOVERY requests (UDP broadcast). These rules appear at startup so it appears that afwall is executing the script.
I have the script installed at /data/local/afwall/afwall.sh, the group/owner is shell, with 755 permissions.
Any ideas on why the Android application can't receive traffic? The application receives the traffic if it comes in on port 6700, but the redirection from 67 to 6700 does not appear to work.
Should I look into using the "afwall-x" chain(s)? If that's part of the solution, do I need to do something about ncm0? Most AOSP devices do not have this interface by default, I am enabling it via superuser shell execution via the Android USB gadget driver:
https://osmocom.org/projects/quectel-modems/wiki/Android_USB_Gadget