yashsingh1/xdaforums huggingface dataset:
[G1 Apps and Games] lou2s:
I tried it on the road. It gives error code which looks like the combination of the previous 2 dev versions. I planned to do the test while I at home, so I installed it. Then I found all my connection is blocked: browser, market, xda, etc. I haven't even ticked anything in droidwall and I thought the clear data and uninstall trick will hv undo any change! I hvn't faced this b4 so I was a bit freaked out. I assumed the app temporarily overwrite the rules on boot so I reboot my phone and thanks god it worked again.

This suggested the latest dev ver has actually started working, though in an unexpected way! I will probably try it again later today. Thx!

P.S. So the changes it made to my phone should be undo upon reboot, rite? Just wanna be sure abt this.
[G1 Apps and Games] rodrigo.zr:
Right. iptables rules are never persistent, they reset when you reboot. If Droid Wall is enabled, it will automatically restore the latest rules on reboot, so that you don't need to remember to do it manually.

If you uninstall Droid Wall while it is enabled, the iptables rules will remain active in the kernel, so your data will remain blocked even after removing the application - this is expected, since Droid Wall is just an iptables front-end.

Good to know that it may work on your phone :) let me know the results
[G1 Apps and Games] rodrigo.zr:
Hello all,

I'm working on version 1.4.2, which fixes compatibility with some devices and also adds support for a basic logging! :D It is now possible to see which applications have been blocked by Droid Wall when the log is enabled.

Could someone test it for me please? I need to make sure it works on most devices. I have already tested on a G1 and N1, both with CM6.

The development version is attached. Thanks!
[G1 Apps and Games] manekineko:
On my HTC Touch Pro 2 running XDAndroid, both marketplace version and the attached development version fail when selecting apply.

The error message is:

Error applying iptables rules.

Exit Code: 11

ip tables v1.4.7

iptables: No chain/target/match by that name
[G1 Apps and Games] mnjm9b:
I just wanted to say thank you for your app... I can't believe this in not included by default.

I can't test the new files at the moment because my phone is acting badly but I just wanted to let you know that your work is HIGHLY APPRECIATED!!!
[G1 Apps and Games] rodrigo.zr:
This error means that your kernel was not compiled with the necessary netfilter owner module. There is nothing I can do on Droid Wall to make it work on that situation, sorry.
[G1 Apps and Games] manekineko:
Thanks for the feedback. I'll see if the guys at XDAndroid would make the change.

I think it'd definitely be helpful for users if there were some way DroidWall could catch that error and display a more user friendly error.
[G1 Apps and Games] lou2s:
Sorry man, just got back from a trip, will help to test it soon!

(Should I just go to CM6? LOL! Is it really a lot better than stock? Stability is my main concern.)
[G1 Apps and Games] rodrigo.zr:
A friend of mine has CM6 on his N1 and had no problems at all so far... Yes, I recommend ;) I use it on my G1 and it is very stable too.

But if you upgrade, please test the latest droidwall-dev on your phone before upgrading, please :)
[G1 Apps and Games] lou2s:
OK, just tested the dev version on my N1 stock rooted. This is the error code I got in show rules/apply rules/enable firewall:

The grep command is required.

Droid Wall will not work.

grep: not found

Hope this help!

P.S. After installing the dev version, all entries in the Market -> Downloads is gone, and only "Droidwall" is shown there! After uninstalling the dev version, they show up again.
[G1 Apps and Games] rodrigo.zr:
Thanks for the feedback.

Regarding the applications not showing in the Market->Downloads... that is not something that droidwall is doing. Probably some kind of "refresh" issue in the market app.
[G1 Apps and Games] lou2s:
Thx. Is it fixable? The "grep" thing?
[G1 Apps and Games] rodrigo.zr:
Unfortunately, I don't think so :( at least not without a big modification.

I need to check if a rule is already active in the kernel, and the only way I found to do this is using grep:

iptables -L OUTPUT | grep -q droidwall
[G1 Apps and Games] rodrigo.zr:
It is possible that your phone has a "grep" applet on busybox, but the link has not been created for it.

If that is the case, the attached development version should work for you... I changed Droid Wall to try to find where "grep" is, instead of just assuming that it is on the system path.

Could you try it for me? Thanks
[G1 Apps and Games] lou2s:
O! I hvn't had busybox installed! Maybe this is the problem...
[G1 Apps and Games] Rosjer:
I've installed this on my SP-CM6-Froyo Tattoo, v1.4.1. running smoothly.
[G1 Apps and Games] fajarep:
i don't know how android security work, but, as far i know, droid-wall using iptables uid to control application. for example i want to allow bloo(facebook client application), i'm adding this application to droidwall. But to get the bloo code, bloo must connect using browser aplication, but i don't want to add browser to application that can access net, maybe just to bloo verification code page only. is that possible?
[G1 Apps and Games] SK0rpion:
hi, all, due to i have the same symptoms with droidwall, i'll join to your discussion.

with your latest droidwall release it returns next error while aplying rules:

"error aplying iptables rules.

Exit code: 2

iptables v1.4.7

iptables v1.4.7: can't initialize iptables table 'filter':Table doesn't exist (do you need to unsmod?)

Perhaps iptables or your kernel needs to be upgraded

"

my phone: LG GT540 or Swift.

Android 1.6

Broach bit: V10G

what should i do?
[G1 Apps and Games] rodrigo.zr:
The only possible way to block individual applications on Android is by the app UID. Unblocking just a web-page is not possible using Droid Wall.

I believe that there are some browser alternatives which implement this kind of per-site access control tough.

This means that your kernel does not have netfilter support, so iptables will not work. The only solution is to switch to a ROM that supports this functionality.
[G1 Apps and Games] rodrigo.zr:
Yes, probably ;)

I even considered shipping a minimal busybox binary with Droid Wall (as I did with the iptables binary) but this will make the application much bigger, so I don't know if this is a good idea,
[G1 Apps and Games] SK0rpion:
could you, please, tell about this approach more closely.

explain, please, what is the main function of busybox?

thanks a lot, Rodrigo.
[G1 Apps and Games] lou2s:
u may consider the way titanium backup implement: putting a link in the setting to download busybox

I will test again after installing busybox. kinda busy these days
[G1 Apps and Games] rodrigo.zr:
@lou2s: last tentative, LOL - could you please try the attached development version? I really wanted to make Droid Wall work on stock ROMs.

Thanks

You need to flash a new, modified ROM on your phone. There are tons of ROMs available here on XDA - just look for a good one for your phone model. PLEASE NOTE THAT THIS IS A DANGEROUS PROCESS IF YOU DON'T KNOW WHAT YOU ARE DOING.

Busybox is a linux application that implements most of the common linux utilities, on a single binary for a smaller size. Most customized ROMs already include a busybox - www.busybox.net
[G1 Apps and Games] britoso:
Tried this, works well but I have a request.

My main goal would be to block certain apps. Can you add an option to block only a few apps?

I've selected the "all" checkboxes...but it looks like I have to manually check all the app checkboxes in order to uncheck only a few apps.
[G1 Apps and Games] rodrigo.zr:
I don't know I fully understood your request, but this feature exists since the first version :)

Just select "Backlist mode" instead of "Whitelist mode", then select the applications that you want to BLOCK instead of allow.
[G1 Apps and Games] britoso:
aaah was looking for that. Clicking on the "Mode:" text brings up that option :)
[G1 Apps and Games] SK0rpion:
and what criterias for new ROM? what kernel should be used in needed ROM or it would be the same but netfilter will be there?

so far i couldn't find any customs for LG optimus *went search again*

`
[G1 Apps and Games] the.bobas:
Hello, I'm running Openetna (bootV1.7, systemV4.4, android 2.1).

Droidwall looks like it's working, but there's no effect of it, it just doesn't block anything. The only clue I see is when I click Show rules, under

0 0 REJECT all -- any ppp+ anywhere anywhere reject-with icmp-port-unreachable

there are many messages

modprobe: chdir(/system/modules/lib/modules): No such file or directory

Is that a problem of Droidwall or Openetna?
[G1 Apps and Games] thump:
FYI. Your dev version is working fine on a rooted Samsung Captivate (SGH-I897), Firmware 2.1-update1. The previous 1.4.1 did not work as it could not seem to find iptables.
[G1 Apps and Games] rodrigo.zr:
This happens when your kernel was compiled without "netfilter owner" support. The only solution is to update your kernel/ROM with one that supports that.
[G1 Apps and Games] rodrigo.zr:
Version 1.4.2 is out!

I have just released Droid Wall v1.4.2 :D

Change log:

Droid Wall v1.4.2 - September/29/2010

Fixed compatibility with devices without the "test" command available.

Fixed a bug where one of the selected applications would be ignored, as if it was not selected at all.

Fixed "grep command is required" error on phones that have busybox grep but the link is not in the system path.

Added support for some 4G/Wi-max interfaces.

Added a simple logging support! It is now possible to determine which applications have been blocked by Droid Wall, if your kernel supports this functionality.

Added a simple busybox binary, so you don't have to install busybox manually anymore.

Get while it is fresh!
[G1 Apps and Games] perandersen:
This seems like a great app, thanks for spending time on it :)

I'm having some problems with Droid Wall 1.4.2 on my Galaxy S running kernel 2.6.29

It hangs during "enable logging" and "applying iptables rules".

Any ideas? I don't have busybox (by Stephen (Stericson)) installed since a lot of Galaxy S users have some issues with it.
[G1 Apps and Games] lou2s:
I installed v1.42 this afternoon (about 8hrs ago) and blocked 3 apps. Just now I launched Droidwall and found that they r all unblocked. Didn't hv this problem with the previous dev build.

EDIT: Just remember I ran cachemate this afternoon, maybe this was the cause?

Then I further test this build, I blocked browser's wifi access (as I am at home). It blocked it successfully. But when I tried to unblock it, I couldn't access web before block/unblock for a few more times. Didn't hv this problem either b4.

Should I stick with the previous dev build?
[G1 Apps and Games] cheebahawk:
just found this app and I think it is great but a couple of question to the Dev:

I dont doubt your veracity and find this app will be helpful.

1) Why does this app need to read the phone state identity?

2) Why doesnt some of the apps installed thru the market show up? such as colorNote, HistoryEraser; and several others. Does it distinguish between apps that access the net and that dont?

3) Why isnt DroidWall on the list of apps to blacklist? I guess this relates to question 2.

For those that have been using this app:

1) How much does this app drain battery?

2) Has battery life suffered? Since it seems like it would kill apps from connecting successfully but does it keep trying to connect in a loop?

Thanks guys!
[G1 Apps and Games] gremmie:
Just installed. New version but I'm getting Application failed to install. Im on a captivate. Do I need to uninstall. Old version first?

Answer--- yes I do
[G1 Apps and Games] mikeymcmikenson:
v1.4.2 working now

rodrigo.zr,

Just wanted to let you know, on version 1.4.1, I was getting the same error code, error code 1, and a failure to find iptables on my Droid Incredible running stock ROM.

Version 1.4.2 no longer gives this error message and iptables rules are applied successfully. The firewall appears to be up an blocking traffic from the specified applications.

You've done a god job. Thank you.
[G1 Apps and Games] GantengX:
When trying to apply rule I receive this error message

Error applying iptables rules.

Exit code: 1

[: not found

[: not found

[: not found

[: not found

--version: not found

I'm using Galaxy S I9000, rooted using RyanZA OneClickLagfix, and I can confirm that I have iptables installed (tried to run it in terminal emulator and it shows that I have iptables v1.3.7 installed)

Anyone have the same problem?
[G1 Apps and Games] BlockbusterF:
Had the same issue like you GantengX. But is't gone with 1.4.2. Now everything works fine. Great App! Thx
[G1 Apps and Games] rodrigo.zr:
You could try to execute the generated shell script manually to see if that works. If that works, then it might be the lack of a "#!/bin/sh" header - on that canse I can probably fix it for the next version.

Do do that:

Click on "Apply rules" and wait for it to fail

Open a terminal emulator and enter root mode (type "su")

cd /data/data/com.googlecode.droidwall/cache

sh droidwall.sh
[G1 Apps and Games] rodrigo.zr:
Could you please check if this behavior persists even after rebooting your phone? Btw... the previous dev build and the official 1.4.2 version are exactly the same (except for the version number) =-/
[G1 Apps and Games] rodrigo.zr:
Thank you both for the feedback :)
[G1 Apps and Games] rodrigo.zr:
The only permission required by Droid Wall is the android.permission.RECEIVE_BOOT_COMPLETED. You can check that here.

I don't know exactly why Android "thinks" that Droid Wall needs this permission. I also noted that newer Android versions also "think" that Droid Wall needs permission to access the SD cards - which is not true.

I didn't spend much time researching on this, but it is probably something that I need to modify on my manifest.

Yes, Droid Wall only shows applications with permissions to access the network. This filter excludes itself from the list too. More details here.

Droid Wall is just an iptables front-end, so it does not consume battery to operate (except when you are applying rules, etc - of course).

After the rules are applied by Droid Wall, the Linux kernel is responsible to block the packets.

The main idea behind Droid Wall is to save battery, not to consume more. :)
[G1 Apps and Games] aussiebum:
First of all, awesomely useful frontend app! Absolutely love being in control of my phone :D

This isn't really an issue, but I noticed when I installed droidwall 1.42, that the droidwall.sh script had 777 permissions?
[G1 Apps and Games] rodrigo.zr:
This script always had 777 permissions :) that is intentional so that you can modify and execute the script manually using any other application for testing purposes.
[G1 Apps and Games] moger1:
Hi,

I own a HTC Hero Android 2.1 But I get the Exit Error 1. On your google side I read that my hero got the wrong kernel :

I rootet my phone only to use your app and now its not working :( When I select "(Any application) - Same as selecting all application" It works! But I want to go online with the browser and block everything other.

Is there an alternative Programm? or can I use an older version of droidwall? Hopefully you can help me in any way :( :(
[G1 Apps and Games] docm:
I love this app - but problems again

Hi! I installed this app on every rom i've tried. it never worked, i always got this error:

"Error applying iptables rules. Exit code: 1

getsockopt for multipart failed strangely: No such file or directory

getsockopt for multipart failed strangely: No such file or directory

getsockopt for multipart failed strangely: No such file or directory

getsockopt for multipart failed strangely: No such file or directory

iptables: Protocol wrong type for socket"

But then with AutaxSense 7.8 it worked. :)

Now i got 7.9 and i think also a newer version of droid wall as it is on autoupdate (1.4.2) and

i get an error again, this time another one: :eek:

"Error applying iptables rules. Exit code: 2

iptables v1.4.7

[1] Segmentation fault / data/data/com.g...

iptables v1.4.7: can't initialize

iptables table 'filter': Table

does not exist (do you need to

insmod?)

Perhaps iptables or your

kernel needts to be upgraded!"

Can someone help me? I loved this app working ....
[G1 Apps and Games] RedWave31:
FYI, I first installed DroidWall on a HD2/Mdeejay Nextsense 2.5 and had a code 1 error.

- Installed TitaniumBackup, hit "Problems", updated Busybox, rebooted via WM6 then Android again : Works like a charm! Thanks!
[G1 Apps and Games] Quantumstate:
Thank you for this, rodrigo.zr. Working great on my Nexus One running Cyanogenmod 6.0 Stable.

I would note that it need to be on the phone (not SD card) so the widget shows up.
[G1 Apps and Games] dillovic:
Hi. I've got the latest Froyo and the latest Droid Wall installed on my Galaxy S.

Can someone please give me a list of applications to unblock in order for Google Talk and Google Maps to work? I've found this website but it's not for Froyo...

Thanks

EDIT: I figured it out! The application that I was missing was 10013: Google Services-Framework. Now Google Talk and Google Maps are working again :)
[G1 Apps and Games] Bec07:
On my galaxy S rotted, froyo, it crashes all the time...

The force close window doesn't show up but the device vibrates three times (1......11) on boot, when applying the rules and when trying to access the log.

Am I the only one with this issue?

Also rules sometimes aren't applied (none whatsoever) or when adding them to a newly installed app they aren't applied properly (whitelist mode, selected app still can't access the web)
[G1 Apps and Games] Bec07:
Everyone else with this issue, use terminal emulator and:
[G1 Apps and Games] mdcollins05:
I'm having a problem with Gmail and this app on my N1 running CM6. When I first install this app (unblock Gmail and other apps) everything works but after a restart of the phone, Gmail no longer can connect. When checking the log, I saw:

[1] segmentation fault /data/data/com.g...

To fix it, I uninstalled Droidwall and restarted my N1. I also had to uninstall Gmail and reinstall it to get it to work again.

Then, I tried it again. I reinstalled Droidwall, but didn't allow Superuser to remember Droidwall. I restarted and it didn't apply any rules. The log is empty, but now when I show rules, it displays:

/data/data/com.googlecode.droidwall/cache/iptables_n1
Chain INPUT (policy ACCEPT 3791 packets, 2061K bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 3163 packets, 732K bytes)
pkts bytes target prot opt in out source destination
[1] segmentation fault /data/data/com.g...

Which most of it is expected because I have not applied the rules. Any idea how to get this working without blocking Gmail?

Any help is appreciated,

Matt
[G1 Apps and Games] mdcollins05:
Well, I may have discovered a fix for my issue.. It sees trying to run iptables_g1 causes segmentation faults, so running:

cp iptables_g1 iptables_g1_old
cp iptables_n1 iptables_g1

As per Bec07's instructions seems to fix my issue also. Don't know why though. Hopefully this will help anyone else with the same issue.

Matt
[G1 Apps and Games] SK0rpion:
hi, rodrigo,

as you adviced me to change ROM - i've done it.

now there is a kernel with netfilter|iptables, so i've installed droidwall from market and tested it, result and error below:

it doesn't block wifi activity (ofcourse it's not a problem)

how can i fix/to help fix it to you?

thanks.
[G1 Apps and Games] SK0rpion:
and one more thing, don't know how, but for the morning phone downloaded data for 612 bytes (while all applications in blacklist),because of what it can be?
[G1 Apps and Games] Bec07:
SIM Toolkit seems to be able to leak data.
[G1 Apps and Games] rodrigo.zr:
What is your Wi-fi interface name? DroidWall currently works for tiwlan0 and eth0 Wi-fi interfaces.

When using "Back-list" mode, DroidWall will block just specific applications. The Linux kernel and other Linux core applications are still able to use the internet.

If you want to block everything, use the White-list mode and don't select any application.
[G1 Apps and Games] SK0rpion:
i use white list mode with one accepted application.

now i understand =)

our interface is wlan0
[G1 Apps and Games] a-son:
This is really really great, its a suberb firewall you have made!

Thank you
[G1 Apps and Games] SK0rpion:
Dear, Rodrigo,

log can show us what applications are blocked and how we can look what applications are passed through droidwall security, if there is no such capability, could you, please, add it in next releases?

thanks in advance.
[G1 Apps and Games] INeedYourHelp:
i get a "code -1" error when trying to apply rules
[G1 Apps and Games] a-son:
cp iptables_g1 iptables_g1_old

cp iptables_n1 iptables_g1

./droidwall.sh

Yes this works on JP6 Froyo galaxy s.

The bad vibrations went outside the phone.

Thanks
[G1 Apps and Games] INeedYourHelp:
Odd. First time using it, I get an error when applying rules.

I tried using that "cp iptables_g1" thing, but it couldn't find iptables_g1.

Now an hour later, I tried using droidwall again and everything goes dandy. The rules apply successfully and I tested it and it works. Strange.

Cool app :)

sgs using froyo 2.2
[G1 Apps and Games] tmadar:
Newb question

Hi guys,

It may have been posted before, but I searched and could not find it. Is there any way to use this (or an alternate app) if you have not rooted your phone? I have an HTC EVO that is a work phone (they let me upgrade from my old BBerry), so I can't really mess with it. The issue is that when I traveled to Canada (which I do faily often for work) the phone pulled in crazy amounts of data while roaming ($240 worth). I had the data guard on, and I only turned on the 3G network a few time a day to check and respond to email, but it still went crazy. I searched around and that brought me here. Sounds like the perfect solution to my problem (turn on the email access on occasion, without letting any other apps access the network), but I can't root my phone. Any suggestions??? If this post is better suited to another forum, let me know and I will move it. Thanks for all you help (I hope)! :)

Todd
[G1 Apps and Games] rodrigo.zr:
On this case I will add support for this interface on the next version ;)
[G1 Apps and Games] SK0rpion:
it's perfect, Rodrigo, thanks a lot!

and one more desire is to have a more log in application, i mean that user could look at everything network activity (for example, it would be very interesting to look at accepted traffic, i don't know how, but for one day it was around 20 kB gprs traffic while whitelist at droidwall was empty and it's a pity, that i can't look what was passed throw it)
[G1 Apps and Games] SK0rpion:
Hi,

could you, please, tell me path where log file of records of blocked|accepted packets of applications placed
[G1 Apps and Games] rodrigo.zr:
DroidWall is just an iptables front-end. That is why it is so light-weight and don't need to be resident in the memory.

That said, the "LOG" is controlled by the iptables LOG target - and is kept in the Linux kernel ring (not in a file).

PS: I already added support for the wlan0 interface (for the next version).
[G1 Apps and Games] rodrigo.zr:
Sorry, but although it is possible (and easy) to implement that, it is not practical because of the way logging is handled by iptables... This would consume huge amounts of kernel memory.

However, it is possible to manually check the number of bytes that passed thru each firewall rule (without much details). You can see that on "Show Rules"... Scroll down to the "Chain droidwall-3g" and you can see for each app how many packets/bytes have gone thru it.

Please note that these statistics are RESET every-time you apply the rules.
[G1 Apps and Games] cynsx:
Thanks rodrigo.zr

Your program is great and works fine on my MS with CM6.1 RC3