GithubHelp home page GithubHelp logo

Comments (4)

skullone avatar skullone commented on July 26, 2024

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.

Miwer avatar Miwer commented on July 26, 2024

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.

rmack avatar rmack commented on July 26, 2024

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.

  1. Select Airplane mode
  2. Reboot device
  3. Wait for the firewall to start up
  4. Turn off Airplane mode

from android_firewall.

kendon avatar kendon commented on July 26, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.