yashsingh1/xdaforums huggingface dataset:
[G1 Apps and Games] kenshinta:
Cross-posting this in case anyone knows here: [App] CifsManager v1.41 + droidwall

Bumping if someone already knows how to make cifsmanager work with droidwall's rules. I prefer not to disable droidwall at all just to make this work.

Curiously, cifsmanger has NO entry in the app list of droidwall. Also, even though the rule "allow root apps" access is already active cifsmanager (or hence the mount script?) cannot connect to the lan.

Contrast with Estrongs filemanager LAN browser without root access is able to browse thru ok (of course browsing and mounting shares are different).
[G1 Apps and Games] interrozitor:
on my HTC Magic there is one application listed as

"Network Location, HTC Radio Info, Android System, Settings, Account and Sync Settings, Settings Storage, VPN Services, Google Backup"

I was wondering, what this application actually is. Apparently multiple parts of the Android - core. But is "HTC Radio Info" and or "Network Location" actually necessary to operate the phone within a 3G Network. That is, is it possible for example to receive E-Mail or SMS with the application blocked?

So far everything seems to work fine, I am just curious...
[G1 Apps and Games] mnjm9b:
slightly off topic>>>

How do you get the iptables to recognize pid?

I would love to do this on linux but I am finding very little in help on this.

this program would be great for the linux desktop environment.

none of the firewalls (iptable interfaces) for linux deal with apps specifically...only with ports.
[G1 Apps and Games] jabakken:
Thank you so much
[G1 Apps and Games] meechto:
Will give it a shot! Don't want a phone like Nexus One to be deprived of data but at the same time want the battery to last longer ;)
[G1 Apps and Games] J-Pro:
Doesn't work on Desire (rooted, log attached)

Hello.

I've installed this great program, because I really need it. But after I tried to turn firewall on, it gave me a window saying:

Error applying iptables rules.

Exit code: 1

[: not found
[: not found
[: not found
[: not found
-- version: not found

I've checked the Log Collector ans here is what I found for DroidWall:

11-16 15:18:13.873 I/ActivityManager( 92): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.googlecode.droidwall/.MainActivity bnds=[245,410][355,528] }
...
11-16 15:18:14.164 I/ActivityManager( 92): Displayed activity com.googlecode.droidwall/.MainActivity: 185 ms (total 185 ms)
...
11-16 15:18:20.193 W/Parcel ( 92): Attempt to read object from Parcel 0x4847dde0 at offset 740 that is not in the object list
11-16 15:18:20.193 I/ActivityManager( 92): Starting activity: Intent { act=android.intent.action.MAIN flg=0x58000000 pkg=com.noshufou.android.su cmp=com.noshufou.android.su/.SuRequest (has extras) }
11-16 15:18:20.553 D/MailRequestHandler( 455): 06021143 onUpdateProgressStatus is not implemented for message.what:13
11-16 15:18:20.734 W/ActivityManager( 92): Activity pause timeout for HistoryRecord{4668fd50 com.googlecode.droidwall/.MainActivity}
11-16 15:18:20.834 D/SuRequest( 569): Sending result: ALLOW
11-16 15:18:20.834 D/su ( 3055): 10071 com.googlecode.droidwall executing 0 /data/data/com.googlecode.droidwall/cache/droidwall.sh
11-16 15:18:20.873 E/DroidWall( 559): [: not found
11-16 15:18:20.873 E/DroidWall( 559): [: not found
11-16 15:18:20.873 E/DroidWall( 559): [: not found
11-16 15:18:20.873 E/DroidWall( 559): [: not found
11-16 15:18:20.873 E/DroidWall( 559): --version: not found
...
11-16 15:18:59.493 W/ActivityManager( 92): Activity pause timeout for HistoryRecord{4668fd50 com.googlecode.droidwall/.MainActivity}
11-16 15:18:59.574 D/SuRequest( 569): Sending result: ALLOW
11-16 15:18:59.574 D/su ( 3059): 10071 com.googlecode.droidwall executing 0 /data/data/com.googlecode.droidwall/cache/droidwall.sh

Please tell me if I can run this great program on my Desire? What should I do for that? I have HTC Desire with Android 2.2 on it.

Thanks in advance!

SOLUTION: Fixed in new version: http://code.google.com/p/droidwall/downloads/detail?name=droidwall-v1_4_2.apk
[G1 Apps and Games] rodrigo.zr:
DroidWall v1.4.3 released!

DroidWall v1.4.3 is now officially out!

Go get it while it is fresh! :D

Thanks for everyone that helped me on debugging the issues.
[G1 Apps and Games] rodrigo.zr:
I don't think you can make iptables work with PIDs nor something similiar.

DroidWall uses the "owner" module to match packets from an user id. The fact that each application on Android has its own user id allowed this implementation :)
[G1 Apps and Games] mnjm9b:
yeah, thats what I kept running into when I was trying to research how to do this in linux... I was unsure how you were doing it. now I understand....

now if only I could figure out a way to get a work around...

I found a few outdated solutions but they no longer work with newer linux iptables.

thanks...

for what its worth, droidwall should be a built-in feature in android. great work.
[G1 Apps and Games] vpraveenis:
DroidWall works well for me. It is a great app to have fine control over what gets access. I have one suggestion. When the app is installed, the Firewall is enabled by default with no apps allowed access in the white-list. When I restored my apps from backup using Titanium backup, I was not able to access the internet though the device connected via wifi successfully. Found out after many hours of trial and error that DroidWall blocked all the apps since no app was selected in the whitelist and firewall was enabled by default on installation of the app.

It would be great if the app has the firewall disabled by default. Users can select apps and then enable firewall manually.
[G1 Apps and Games] rodrigo.zr:
Thanks for pointing this out. I have fixed this mis-behavior for the next version ;)

Please use the official project issue tracker to report issues in the future tough: http://code.google.com/p/droidwall/issues/list
[G1 Apps and Games] kenshinta:
I prefer that behaviour though.

BTW please do take a look @ here, and maybe have an idea what to do to allow network mounts without disabling firewall or setting to "allow all" temporarily..

Also, I noticed now (with 1.4.3)there is a uid 2000: Linux shell in the app list (or has it been always there?). Hoping it would allow mount to work but to no avail. What exactly does this refer too?
[G1 Apps and Games] rodrigo.zr:
Linux mount points are most probably handled by the kernel, not by user-space applications. The only way to allow connections from the kernel is to use the Black-list mode rather than White-list.

This is related to this issue.
[G1 Apps and Games] Danation:
I just wanted to mention that this is working perfectly on my HD2 so far.

I've been hoping to find something like this for a long time. Great work!
[G1 Apps and Games] rodrigo.zr:
Hello all,

I have my own Android Market account now :)

Many, many thanks to Jesse C for publishing DroidWall while I didn't have my account (it wasn't allowed on my country at that time).

I will now be able to update the market version more often than before. And I have many new features in mind for the next versions.

Unfortunately, we cannot move an application ownership on Market, so I had to publish DroidWall under a different package name. You can find the new version under the name DroidWall - Android Firewall or just scan the QR code on your phone:

Please, don't forget post a review of the new version ;)

Note that both versions will be installed in parallel, but I definitely don't recommend keeping both since they will "fight" with each other. Remember to remove the old version after installing the new one.
[G1 Apps and Games] Neejay:
sweet! I still use this from time to time, helps a great deal with battery life as well.
[G1 Apps and Games] mmlulin:
Very cool app. :) I got exit code 1 error with 1.42 today when applying rules, and could not figure out the reason. While browsing the market, I found v1.45. I was confused when 2 apps are in the market, with the same description but different authors. You may want to add a few words in the description for v1.45, so that people don't get confused.

Occasinally, I need to use different white list. Did you consider setup different profiles of whitelist/backlist for various situations: such as within the country (block apps partially) or international travel (block all apps)? Also, could you add an option to back up the whitelist/backlist?

Keep up good work! :D

Oops, never mind, I saw on your webpage that you would add the profile/back up feature in the next release. Looking forward to it.
[G1 Apps and Games] mmlulin:
:confused: I am using the whitelist with Droid Wall. I just installed the xScope browser 6.21. It is strange that the xScope browser is not listed anyway in Droid wall, I could not even allow it to access the internet. However, the broswer can load webpage. How does it get access to the internet?

Anybody has a clue?
[G1 Apps and Games] rodrigo.zr:
Just installed xScope for testing and it shows just fine on DroidWall's list.... It should be the last application on the list since its name starts with a lower-case "x". Can you confirm if it is not showing on your list?

When I blocked it on DroidWall and attempted to navigate it seamed to be working, but I found out that it was only loading pages from the cache. When trying to navigate to a page not on cache it failed to load.
[G1 Apps and Games] mmlulin:
OK, mistery solved. Upon re-checking, I found xScope was in the whitelist. I just don't understand how it got there. I tried to whitelisted it after installing yesterday, but I could not find the app and it had access to the internet already.

I removed it from the whitelist, and the xScape was blocked and confirmed by the log. BTW, really LOVE the log, which confirms that the Droid wall works properly and let you know what is going on in the backgroud.
[G1 Apps and Games] rodrigo.zr:
Just to make it clear, since some ppl asked me:

The new version published on Market has the same signature of the APKs published on the website. However, you can't install the APKs from the website "over" the market version since the package name was changed on Market (if you try, they will install side-by-side).
[G1 Apps and Games] kenshinta:
Update on my situation using cifsmanager: after upgrading to v1.4.5 did a few reboots afterwards for various reasons. Then tried to use cifsmanager to mount shares - they worked! Reviewed my droid wall rules, and there wasnt anything significant added, so test something out I disables the root app rule; sure enough I'm unable to mount anymore. Re-enabled the root app rule, this time cifsmanger could NOT mount the shares! Puzzled, I rebooted, then I could mount the shares again. Note I am on the black-list mode still.

My guess is the combo of v1.4.5 and a reboot after setting the allow root app rule solves this. But why, and maybe there is insight on how I could avoid a reboot in the future if I need to to do a enable-reenable loop in the future.
[G1 Apps and Games] bland.life:
Must DroidWall be on phone memory to work correctly?

Or its ok to put it on the SD card if I don't use the widget?

Been getting black screens.
[G1 Apps and Games] rodrigo.zr:
On Froyo, it is okay to put it on the SD card (if you don't use the widget, obviously).

DroidWall is not a resident application, it is just an interface for configuring iptables.
[G1 Apps and Games] bland.life:
Ok, I get it!

Thanks :)
[G1 Apps and Games] psygbert:
what's the difference b/w the droidwall in the market and in the code.google.com page? seems the one from code.google.com is running as "com.googlecode.droidwall" while the one in the market is "com.google.com.droidwall.free". of course their checksums will be different though i haven't check the checksums file by file inside the apk.

thanks.

EDIT: answered.
[G1 Apps and Games] old_dude:
Great app. Thank you kindly.
[G1 Apps and Games] sebastienbo:
Feature Request: Block dataplan gprs/edge/3g while Roaming

Hi,

Could you implement firewall profiles?

Using other Firewall rules while roaming is an example.

Or does that feature already exist ?
[G1 Apps and Games] rodrigo.zr:
This is a feature planned for the next releases.

I just need more time to work on that :D

You can follow any progress subscribing to this issue:

http://code.google.com/p/droidwall/issues/detail?id=7
[G1 Apps and Games] madubi:
Hi

I've installed v1.4.5 and when I want to enable the firewall, I get this:

Error applying rules. Exit code: 2

iptables v.1.4.7

iptables v.1.4.7: can't initialize iptables table 'filter': Table does not exist (do you need to insmod?)

Perhaps iptables os your kernel needs to be upgraded.

I find nothing about this yet...
[G1 Apps and Games] minicheck:
Can anyone tell me which applications I have to whitelist in order to get Exchange Active Sync to work again?
[G1 Apps and Games] rodrigo.zr:
Hello, this is the first item on the FAQ:

http://code.google.com/p/droidwall/wiki/FAQ

You can use the log feature to see which applications are being blocked. This may help you determine which apps to enable.

If the log displays "App ID (unknown)" as being blocked, then it is probably the kernel and not an application. On this case, the only solution is to use the black-list mode.
[G1 Apps and Games] madubi:
Thanx for the help.

I have X8 2.1 rooted... :mad: shame for SE...
[G1 Apps and Games] zurpher:
Dear rodrigo.zr,

Thank you very much for DroidWall. Great app. Please keep up the good work.
[G1 Apps and Games] screama:
Hi,

I just installed DroidWall and it just worked perfectly fine for normal apps.

Now im tryin to use CifsManager. When the firewall is disabled, everything works just great.

Firewall on -> "Connection refused"

Heres the DroidWall log:

App ID (unknown) - Blocked 12 packets (12 packets for 192.168.20.2)

So... is it to possible to add rules like "Allow everything for IP 192.168.20.2"?
[G1 Apps and Games] XenSA:
To rodrigo.zr,

Thank you very much for DroidWall. Great app.

Thanks for all the hard work... look forward to the future of this great app
[G1 Apps and Games] xNotta:
Hi,

I am getting the app id unknown in my log.

I read above that it is probably my kernel causing this problem.

Screen of the log attached.

The IP goes to XDA and is being blocked.

Is there a work around that will let me keep using Whilelist mode?

(I'd be lost without this app. Thank you!)
[G1 Apps and Games] rodrigo.zr:
There is no official way of matching kernel packets on iptables (at least I couldn't find any).

I will take a look at the kernel source-code and try to find a work-around for this, but unfortunately I cannot guarantee anything :rolleyes:
[G1 Apps and Games] weeezer:
Does the app still run after you press the back button? 'cause i don't see it neither in the Taks Manager under Running appss, nor in the status bar...
[G1 Apps and Games] xNotta:
Thank you!

I updated my sig to have more updated info.

CM6.1.2 with ZenDroid 1.1.0 AVS BFS.

Since I can confirm this happening I'll try another kernel to see if it fixes the problem.
[G1 Apps and Games] rodrigo.zr:
DroidWall is just an iptables front-end. Once DroidWall configures iptables it can exit and the rules will still be enforced by the Linux kernel.
[G1 Apps and Games] rodrigo.zr:
Yay! Looking at the netfilter source-code I found a workaround for this problem.

The attached development version adds a "(Kernel) - Linux Kernel" entry in the list which will allow/block connections from the kernel (depending on the selected mode). :D:D

I tested it with CifsManager and it worked perfectly. Can you guys test it too?

Thanks
[G1 Apps and Games] godsquare:
Could someone please guide me how to allow email to push to my gmail app after enable firewall ?

When i'm in wifi, which is all app are allowed, i will receive gmail notification after email arrive my inbox in few seconds.

But when i'm in mobile network, which only gmail allowed, i don't receive any gmail notification after email arrive my inbox at all. Only way I can find out if I get new mail is to open gmail app and ask it to refresh.

Any app I have to add to whitelist to allow gmail push ? Or what should I do to get gmail push to work with droidwall ?

Any suggestion would be appreciated,
[G1 Apps and Games] xNotta:
I've been using this version since you posted it.

Allowing the kernel eliminated the "unknown" process being blocked.

Everything has been working fine.

I'm running whitelist mode.

CM6 nightly 223 with ZenDroid 1.1.0 AVS BFS.

Thank you!!! :]

My Evo made me Swype this from the XDA App.
[G1 Apps and Games] screama:
Hi. I just tried the dev-version and... it works!

But i really don't want to open up every connectin to/from the kernel - the option to allow single IPs would be awesome.
[G1 Apps and Games] rodrigo.zr:
On my phone, enabling this entry works fine:

Calendar Sync Adapter, Google Services Framework, Contacts Sync Adapter

Great! Thanks for the report ;)

Good to know it is working fine. I agree that an option to allow single IPs would be better, but that would require much more development time (something that I currently lack, lol)
[G1 Apps and Games] blueren:
Is this application only for G1? I installed it on my LG o1. Set the rules (turned off 3g/wifi access to gtalk), Rules applied with success.. but gtalk is still being granted net access. I tried to chmod 777 (and 755) the iptables but it says that its a read only system.. I'm running on stock Froyo. Please assist
[G1 Apps and Games] rodrigo.zr:
No, it is for any rooted Android phone with iptables support on the kernel.

This is probably because the Gtalk uses another service, such as the "Google services framework" to communicate.
[G1 Apps and Games] blueren:
Hmm.. I tried it out on the market app and it worked. But again doesn't work on apps like power amp etc. Either way, nice app! :)
[G1 Apps and Games] johnw.xda:
I find dmesg can read the some iptables log but,

can i keep the full log to file for later audit ?

like /var/log/messages | syslogd does on linux/desktop ?
[G1 Apps and Games] lou2s:
I found Google talk can still get through even it is not on my white list.
[G1 Apps and Games] NhocCuteGirls:
I'm sure a lot of seople will find this useful, however you should move you post to the games and programs forum. This is for rom delvelopment. Not trying to be rude, just a PSA before the mods move it.

On the top righthand side of you post you will see a triangle with a exclimation mark. Click it and ask a mod to move your thread to the appropriate forum.

If I ever have to drop my unlimetd plan I will be looking for a program like yours. Keep it updated and good luck

__________________
[G1 Apps and Games] rodrigo.zr:
Sorry, but adding such a feature would require DroidWall to keep a service running 100% of the time, and I don't like this idea ;)

This is because Google Talk uses another service for internet communication. Something like "google services framework".
[G1 Apps and Games] johnw.xda:
Sorry to say that, but i'm not mean, want this feature for DroidWall.

I just want to know, how to log the iptables LOG to file.

I did some search, maybe busybox/syslogd can do that? right?

How do you log it to file?

Anyway, thank you and your nice software.
[G1 Apps and Games] rodrigo.zr:
You can manually copy DroidWall iptables logs to a file with the following command (for example)

dmesg | grep DROIDWALL > /mnt/sdcard/droidwall.log

You can probably make syslogd work on Android too, but I don't know how to do it.
[G1 Apps and Games] johnw.xda:
ok, thank you.
[G1 Apps and Games] rodrigo.zr:
Version 1.4.7 is finally out!

Changes from 1.4.6:

* Added support for blocking/unblocking connections from the kernel. This fixes compatibility with applications such as CifsManager

* Fixed a bug where newly installed apps would be selected on DroidWall if you had removed a selected app (issue 79)

Update thru the Market, or download from the website :D
[G1 Apps and Games] highlandsun:
I use this on my G1 with no problems. I've started using XDAndroid on a Touch Pro 2 and want to use this as well, but it's not working. I guess some netfilter module may be missing from the kernel. Can you please post a list of required kernel features to make this work?
[G1 Apps and Games] lou2s:
Thx for the update. Found a problem. Previously I had enabled Google maps in my white list. So today I updated droidwall, then updated Google maps. I opened Google maps right after the update and it said I don't hv a network connection. I opened droidwall and saw Google maps were both unticked under wifi and 3g. I noticed my other newly updated Apps were also unticked. Is it intended (coz I read something abt new Apps in changelog)? But these are "old Apps"! Plz take a look at this. Thx!!
[G1 Apps and Games] rodrigo.zr:
The most important kernel feature is the CONFIG_NETFILTER_XT_MATCH_OWNER (and its dependencies). The FAQ has some info on the common errors:

http://code.google.com/p/droidwall/wiki/FAQ
[G1 Apps and Games] rodrigo.zr:
Just confirmed this... Thanks for the report! I will make a bug-fix release asap.
[G1 Apps and Games] rodrigo.zr:
Version 1.4.8 is out and should fix this problem :D
[G1 Apps and Games] stooooo:
Choice! Pretty much a requirement for survival on the embarrassing mobile data plans we have in NZ.
[G1 Apps and Games] gamaTeam:
is there any way to block access by ip address?
[G1 Apps and Games] highlandsun:
Thanks. It turns out the necessary modules are present in the XDAndroid kernel builds, but they're not being loaded by default. The xt_owner module satisfies the XT_MATCH_OWNER requirement. It also needs the ipt_REJECT module, since that supplies the REJECT destination for the iptables rules. We have to modprobe these explicitly in our init script in order to have it working at boot time.

And I'd guess we need ipt_LOG for the logging option to work, haven't tried it yet.
[G1 Apps and Games] rodrigo.zr:
correct... the log is optional but highly recommended ;)
[G1 Apps and Games] Neejay:
Nice, glad to see you're still developing this.

I was getting an error when I did a "upgrade" to 1.4.8 on CM7 (gingerbread), from 1.4.7. Something about an io java error or something. I saved the logfile, but Im not sure where it's stored. I decided to try uninstalling, and re-installing. After I uninstalled, and re-installed, I no longer got the error and everything worked just fine.
[G1 Apps and Games] zman519:
I installed Samba Server for Android and checked WiFi in droidwall but it was still blocked so i checked both 3G & WiFi still blocked.

Then i turned the firewall off and it worked:confused:

I got it working with droidwall on by checking (root) Apps running as root.

rodrigo.zr any ideas about why its working like that? I guess its some thing i should ask the dev of "Samba Server for Android" but i thought i would post it hear.
[G1 Apps and Games] rodrigo.zr:
Did you click on "Apply Rules" after you checked root on Wi-fi?
[G1 Apps and Games] zman519:
Yes I applied.

I found out in the samba thred that it's becuse of the way the samba file server works it does not call for network access so droidwall can't pick it up. But samba runs under root so if you alow root apps it works. That's what some one was saying in the other thread.

rodrigo.zr thanks for the firewall its really nice to have somthing like you made. I'v always wanted to know what apps are going online and what can't .

Maybe you can ask jimmy the samba dev about how the server is calling and what its doing. I have not looked into it a real lot yet. I just found it last night and was really happy to find it ;-) now I never have to plug the phone in with samba and wifi adb lol

Sent from my ComBadge
[G1 Apps and Games] sil3ca:
Motorola Defy

Hello, not sure if was already reported or not, but version 1.4.8 works fine (already 3 days testing) on Motorola Defy with stock rooted Motoblur (Blur_Version.6.14.5MB525.AmericaMovil.en.BR).

I though I would have problems due to Motorola lack of Netfilter feature (I can not run Transparent Proxy for example).

Great job Rodrigo!!
[G1 Apps and Games] lou2s:
Thanks alot for the fix! It works now!
[G1 Apps and Games] BruceElliott:
Inbound IP

Thank you very much, Rodrigo; very well-designed.

Would it be possible in the future to add a blacklist for incoming IP addresses?