Comments (4)
I have looked into this in the past but decided against it due to the amount of devices where init.d wasn't functional. I will see what I can do though about adding it in a future update.
from android_firewall.
Yeah not every phone supports init.d scripts. CM based roms should support it however. I'm using a CM10.1 based rom and I have a script called 00iptables in /data/local/userinit.d/
/data/local/userinit.d/00iptables
#!/system/bin/sh
iptables -N droidwall
iptables -I OUTPUT 1 -j droidwall -p all -s 0.0.0.0/0 -d 0.0.0.0/0
iptables -I droidwall 1 -j DROP -p all -s 0.0.0.0/0 -d 0.0.0.0/0
Init will launch it as one of the first things (due to the '00' prefix in the file name), before Android apps are started, and effectively block all outgoing traffic. When the device has completed booting, Android Firewall will flush the droidwall chain and insert the proper rules you've set.
from android_firewall.
A potential idea...
If the firewall could turn on Airplane mode when a reboot is initialized, and then turn it off after a device reboots; then this could potentially enable a work around for other apps gaining network access after a reboot.
Please note I haven't investigated if Airplane mode actually prevents any network traffic upon reboot at this time, so this is just a hypothesis of mine.
Currently I do this manually.
- Select Airplane mode
- Reboot device
- Wait for the firewall to start up
- Turn off Airplane mode
from android_firewall.
@skullone: you could make the app check whether some sort of init.d folder exists or not. I guess, I am no programmer :)
@Miwer: thanks for the script, I will use that for now. I actually was hoping someone would paste something so I wouldn't have to use my own brain to come up with a script ;)
from android_firewall.
Related Issues (20)
- Installation/activation
- ipv6 rules missing HOT 1
- Logs are empty
- Set limitation on ports HOT 1
- Realtime Rule changing HOT 1
- OpenVPN support? HOT 3
- The Bluetooth PAN support HOT 6
- Frozen Apps
- android firewall block all vpn transport HOT 5
- Interfernce with Hotspot HOT 1
- VPN Support
- Add Android Firewall to F-Droid HOT 1
- Settings for a new profile are not saved unless a rule is also changed
- Unused profiles are set to disabled by default
- VPN service being blocked 4.4.2/5.0.1: Unless access 'Apps running as root' ticked. HOT 3
- Android Firewall not appearing in google play or google search HOT 5
- Download .apk?
- Please bring a new version to android 6! HOT 3
- Tracing dev of old build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android_firewall.