yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] defim:
You could even both together, AFwall the kernel/iptables way and LW with java/xposed.

I used AFwall earlier, but I had the issue that the rules where not applied correctly always. Maybe because of reapplying rules on every reconnect, with not good gsm signal could be many reconnects.

And Android needs to tell the apps about reconnect, which could take some time, depending eg on cpu load. LW reads intern state in Android and so always correct "zone" is used
[Xposed Framework Modules] Dany-69:
Hello defim ^^

I got a problem... i've enables iptables, but I'm still not able to black all the packets sent from an app..

For example, i'ive blocked EVERYTHING about the Amazon App shop (just to give it a try), but the app is still able to show most of the "objects"..

In the log I can see that a lot of connections are denied to the amazon app, infact i'm not able to see the images of the apps in the store in fullscreen mode, but i still can navigate in the store without you module blocking all the traffic...

Moreover, i've enabled:

- Log incoming connections

- Log outgoing connections

- log allowed connections

- log denied connections

but in the log i'm not able to see any "incoming connection" from the amazon app, even if i'm browsing in the store...

Am I doing something wrong?
[Xposed Framework Modules] w0rinal:
Some items in the Amazon app might be cached that's possibly why you can still browse items. You can try switching Wifi and mobile data and open Amazon app again. If you can still browse apps you know you browse entries from the cache.

Incoming connections are only being used when using streaming apps to watch movies stored on a hard drive or NAS in you local network or something, I think.

But I have to admit it seems like LW's iptables support was not that reliable, compared to other iptables firewall solutions

I still prefer it over other apps due to the xposed character (no startup leak, no running service, no kernel support needed, etc)

Sent from my Boeffla powered Slim GT-I9300
[Xposed Framework Modules] Arcadejinx:
I'm new to all of this, so just a innocent question: does one really need a firewall on an Android device?

If so, I'm downloading this right now!

Tapatalk | Samsung Galaxy S4
[Xposed Framework Modules] defim:
No, just disable network connections ^^

Sometime you want an app not access internet. So "SELinux Mode Changer " got just today an update wiht additional permission for noetwork which is only used for adds. Flashlight apps have also sometime network permissions for undisclosed reasons.

Or an app should only acces local devices,not the internet etc
[Xposed Framework Modules] jaibar:
It's up to you if you need or want one. For example, you happen to see that your favorite torch app keeps constantly communicating outside. Now, that is sort of behavior that for the browser you probably don't mind and really want to allow internet access, but the torch? Why does it go on internet? Never mind, you can just firewall it...

Suppose you really really don't mind all your apps accessing internet while you're in wifi, but you have limited plan on cellular data, and that torch app is eating and munching all of your quota... Firewall it and give only WiFi access.

Traveling abroad? You may just find that your vacation cost has just doubled itself the first minute you opened the phone abroad. All of your apps sync'ing data, this may cost you a little fortune. Now, you have built in option to disable data while roaming, but I think it disables all of your data access, whereas you want to block all apps while roaming except maps, translate and email which you decided are helpful and need them in vacation. No problem, firewall is your friend.

And it's also good for various levels of paranoia. A firewall+ XPrivacy and you start feeling the NSA/KGB/Whatever can't have a go at you. Not sure if it really helps against security agencies, but it gives you a feeling that at least you are doing something... [emoji16]
[Xposed Framework Modules] Arcadejinx:
[MENTION=4501300]defim[/MENTION] [MENTION=3599815]jaibar[/MENTION]

Ah, I see! Comes in very handy to me then. Thanks for the explanation!

Tapatalk | Samsung Galaxy S4
[Xposed Framework Modules] robinson91:
Hello,

What brings exactly the setting "Use iptables additionally for native accesses"?

Thank you.
[Xposed Framework Modules] defim:
It applies additionally iptables rules
[Xposed Framework Modules] F308:
Did you guys notice that too?

Since 2-3 days I am frequently getting FC on it.

After that it loses it's settings.

I didn't do much changes on my phone, unly updates come from Google Play.

Phone:

Xperia Z1C, stock K.K rom, rooted, BL locked.
[Xposed Framework Modules] defim:
What version had you before installed? Maybe a reboot is needed

This module shows you a notification for unhandled exceptions, not only the FC dialog without the source: http://repo.xposed.info/module/io.github.mthli.cracker

If you could catch a FC, please post it
[Xposed Framework Modules] F308:
I wanted reproduce error.

Downloaded yesterday version 3.1.1 directly to phone via Xposed framework and observed weird behavior.

Starting app some times it happened that list of my applications was incomplete or showed settings different from which I've set.

Next time thing was OK, next next - history repeated.

I observed FC too, message was: "Application stopped working", nothing in log.

I reverted to version 2.5.2. Will watch it.
[Xposed Framework Modules] defim:
You rebootet the device after update?

The "cracker" module is for the "FC" dialog.It tells then what and where it happen
[Xposed Framework Modules] F308:
I remember about reboot. I even cleaned Dalvik cache to have fresh compilations.

Didn't know about Cracker module, installed and caught error after some tries.

Attaching file.
[Xposed Framework Modules] defim:
[MENTION=5143675]F308[/MENTION]: Thanks! The TransactionTooLargeException (package manager has died) of PackageManager.getInstalledApplications has many results by internet search, but seems not compületely be prevented. Best solutions seems "dont install to many apps so the transaction is not bigger than 1MB" ^^.

LW loads the settings for each app, and there could be a race condition if none/not all apps are loaded and at this moment then the settings are saved...

This should be fixed in next version
[Xposed Framework Modules] F308:
Good to clarify that.

Take your time ...
[Xposed Framework Modules] defim:
[@F308: Should be fixed. Please catch & report if you could get more exeptions :angel:
[Xposed Framework Modules] F308:
I didn't get FC but race condition occured.

If I launch LW 5 times - 1 of those displays permissions completely different from what I configured.

Sometimes application is missing.

So far didn't find pattern in this behavior.
[Xposed Framework Modules] cantenna:
This app doesn't seem to work for me on lolipop, blocking an app altogether seems to not take any effect
[Xposed Framework Modules] defim:
[MENTION=5143675]F308[/MENTION] Had not found another race condition. Maybe its only a screenn glich? When does settings change? If you enter the details of an app and exit it again? Or while scrolling in main list? And in the logfile, are there wron appg allowed/denied?

I've attached a try with better handling of TransactionTooLarge .. maybe it helps

Xposed log could help. Also enabling logging + the in-app log file
[Xposed Framework Modules] F308:
Mainly when I opened/closed LW some times in row and scrolled down.

I will try changed apk in free moment.
[Xposed Framework Modules] Ronii10:
What does this module exactly do?
[Xposed Framework Modules] Ronii10:
What do you mean with ???
[Xposed Framework Modules] w0rinal:
I think he wants you a) read OP, b) read the comments (the difference between this module and conventional firewalls has been explained a dozen times)

It prevents apps you can choose from using connections you can also choose (your local network, your Wifi which connects to the internet or mobile data network, to just name the most important ones)

[size=-4]Sent from my Boeffla powered Slim (4.4.4) GT-I9300[/size]
[Xposed Framework Modules] Ronii10:
I did that I still dont understand what it does
[Xposed Framework Modules] w0rinal:
So you want to know what this module does, or how it achieves what it does?

I don't know the degree of understanding of Android you have so you need to be more precise, otherwise I or other users can tell you things you already know or talk about stuff you might not understand at all

(I don't know too much about programming myself but considering the 'unpreciseness' of your questions I can't figure out how much you already now)

[size=-4]Sent from my Boeffla powered Slim (4.4.4) GT-I9300[/size]
[Xposed Framework Modules] Ronii10:
Yes what does it do?
[Xposed Framework Modules] w0rinal:
Well, basically, White this module you can choose whether an app can access the internet or not and via which ways (Wifi, mobile data network, etc) - or via which ways it can't.

Install it, activate it in the xposed installer, reboot, open the this app, select an app (for example xposed installer), select the connections from the list you want xposed installer to be able to use (green) or to prohibit (red) and there you go

[size=-4]Sent from my Boeffla powered Slim (4.4.4) GT-I9300[/size]
[Xposed Framework Modules] Ultimous:
Thank you for yet another awesome app ...

http://xdaforums.com/note-4/general/firewall-advice-plz-t3080303#post60081922
[Xposed Framework Modules] SyCoREAPER:
Hey [MENTION=4501300]defim[/MENTION]

Love your Apps, bought the Donator app. Anyway you can update the interface on this and make it a little easier to use?
[Xposed Framework Modules] w0rinal:
Considering the fact that you usually don't set it up everyday I'm fine with the UI. Do you have any concrete ideas in mind?

But if [MENTION=4501300]defim[/MENTION] decides on revamping it, I would like to be able to hide the "incoming connections" indicator completely so there will be only one horizontal bar beneath an app on the main page :)

[size=-4]Sent from my Boeffla powered Slim (4.4.4, AOSP based) GT-I9300[/size]
[Xposed Framework Modules] SyCoREAPER:
It just feels too dated and overly complicated to set up. For example, Wi-Fi is self explanatory but what the hell is the difference between Mobile and Network?
[Xposed Framework Modules] w0rinal:
Yeah, that's probably the power of xposed :D

Didn't know when incoming and outgoing connections are used either.

Mobile refers to cellular data and Network grants or denies access to your NAS, your smart TV,

Your local area network but not the Internet

[size=-4]Sent from my Boeffla powered Slim (4.4.4, AOSP based) GT-I9300[/size]
[Xposed Framework Modules] liaodahao:
It can't log the native access even if I enable additional iptables.
[Xposed Framework Modules] w0rinal:
They don't show up in the log or you can't see a "log native accesses" check box?

I don't think the latter exists so apps acquiring Internet access through native accesses should also be listed in the log when logging in general is activated

[size=-4]Sent from my Boeffla powered Slim (4.4.4, AOSP based) GT-I9300[/size]
[Xposed Framework Modules] liaodahao:
They don't show up ,and there isn't a "log native accesses" check box.

I tested it with Terminal Emulator for Android. I blocked <Linux Kernel> in LW first, and input "ping" command in Terminal Emulator for Android, then it was blocked by LW, but the log didn't show up.

The java accesses can be logged normally.
[Xposed Framework Modules] w0rinal:
I can't tell you about that in detail since I am rather user than developer (actually I'm not a developer at all lol)

But in early stages this module only supported the non-"native accesses" way, so maybe OP didn't implement the functionality to log them by now.

[size=-4]Sent from my Boeffla powered Slim (4.4.4, AOSP based) GT-I9300[/size]
[Xposed Framework Modules] liaodahao:
I agree. Hope that OP will implement it.
[Xposed Framework Modules] liaodahao:
Hi, defim

I encountered a problem.

I've installed more than one hundred apps on the external SD card, and my device's RAM is only 512 M, so it still takes some time (about 20 seconds) to load these apps after booting completely.

The problem is that LW is loaded quicker than these apps (because LW is installed on the internal SD card), then LW will apply the iptables without those apps installed on the external SD card.

So, if some of these apps have native access, then LW can't block them. I have to wait these apps to be loaded completely, then make some change to the LW settings to let LW apply the iptables again.

Could you find a way to avoid this problem?
[Xposed Framework Modules] defim:
[MENTION=1506211]SyCoREAPER[/MENTION]: I did the best im able to ;) I know there are 100% material compatible apps, but its useless if the app sis slow and does not what it should...

Incomming connections are 99% not used, so its a good idea. You mean just hide it? Or hide + disable also?

Xposed is to hook Java methods which are running in their VMs. Native methods could not be hooked. So atm not possible

Great problem description :good: I can add to watch http://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_MOUNTED and then reload rules

(If you have a adb connection to you device you could use "ReceiverStop" + enable logging to see when this event occurs at startup)
[Xposed Framework Modules] SyCoREAPER:
By no means critizing. I love you work and I run many of your apps. Its just this particular one I find confusing to set up.
[Xposed Framework Modules] defim:
More options mean most time difficulter configuration. Its the best ideas i had. And no tiny checkboxes i can't hit with my thumb ^^

Oh, and i forgot: "network" is the local network you are connected to. This are for most home Wlans "private ips" (http://en.wikipedia.org/wiki/Private_network). This could be configured in the app to only wlan or also vpn. But not for mobile, which use also often 10.0.0.0/8 networks. So if you eg use my app FreetzMobil which should onyl connect to you local router, it needs only "network" but no internet by wifi/mobile
[Xposed Framework Modules] defim:
[MENTION=6006105]liaodahao[/MENTION]: Can you test attached file? In settings>iptables is a new option. Please enable & reboot. Then check the in-app log for some "caught" lines and post them

[MENTION=5856428]w0rinal[/MENTION]: Also options to hide (only hide) more on main added
[Xposed Framework Modules] liaodahao:
It didn't work. It didn't refresh the iptables, it was only granted superuser access once at start up, I saw this in SuperSU's log. I attach the in-app log screenshot here. SuperSU granted the superuser access at 22:23.

I don't know how exactly to do...
[Xposed Framework Modules] defim:
[MENTION=6006105]liaodahao[/MENTION]: Maybe the action is not more used wiht latest Android APIs. I cant catch it on my device and thought is was because no sdcard.

I've attached another try. Please make sure its still enabled in the settings
[Xposed Framework Modules] liaodahao:
It seems that LW refreshed the iptables too early, and there is an error in the log.

Some time for reference:

13:42:17 booted to lock screen

13:43:24 apps on external SD card loaded completely

My android version is 4.2.1
[Xposed Framework Modules] liaodahao:
By the way, LW reverses "Log incoming connections" and "Log outgoing connections“.

"Log incoming connections" actually logs the outgoing connections, and "Log outgoing connections“ actually logs the incoming connections.

I found it long time ago...
[Xposed Framework Modules] w0rinal:
Nice, exactly what I was talking about :thumbup:

[size=-4]Sent from my Boeffla powered Slim (4.4.4, AOSP based) GT-I9300[/size]
[Xposed Framework Modules] F308:
Are you sure?

That could boil my brain.

If so - no wonder that many of my analyzes failed.

Need to test it myself.
[Xposed Framework Modules] defim:
[MENTION=5143675]F308[/MENTION] [MENTION=6006105]liaodahao[/MENTION] You are sure you understand difference between in and out connections? Its not about in which directions data are transferred, but how connection is opened! If you are client or server

The iptabled fail is because 2 run parallel and 1 aborts then and retries later...

But also this event is not the correct. So can you install ReceiverStop (Xposed app) and enable all logging? This should then show which broadcasts are send at startup, maybe theres a special one
[Xposed Framework Modules] liaodahao:
Sorry, I don't quite understand it.

What should I do with ReceiverStop? I just installed it and enabled all logging, rebooted, and waited for apps on external SD card loaded completely, then copied the log in ReceiverStop. But I don't see anything useful. I attach the log here.

Some time for referece:

06:34:37 booted to lock screen

06:35:46 apps on external SD card loaded completely

I've installed AFWall+ for reference, and it can apply the iptables correctly even if apps on external SD card haven't been loaded completely yet, maybe this is a new thinking.
[Xposed Framework Modules] F308:
Well, I did thinking once more.

IMAO question is who sends first packet, SYN initiating connection.

If I do that - it is outgoing connection.

No problem to install module and have a look what it has to say.
[Xposed Framework Modules] defim:
[MENTION=6006105]liaodahao[/MENTION]: Yes onyl log all the broadcasts This is to see which are sent on start, and maybe there's some special if you apps are ready
[MENTION=5143675]F308[/MENTION]: Yes, so in most cases on a Android device it's an outgoing connection
[Xposed Framework Modules] RSDamasceno:
[MENTION=383251]defin[/MENTION] any chance of this work in Lollipop 5.1.1?
[Xposed Framework Modules] :
According to this thread LightningWall doesn't work with Android 5.1: http://xdaforums.com/xposed/modules/discussion-xposed-modules-5-1-lolipop-t3075257

[MENTION=4501300]defim[/MENTION] I hope that you can add support for Lollipop :)
[Xposed Framework Modules] defim:
All my modules are compatible wiht Android 5.1, but you need a recent Xposed, see my signature for liks
[Xposed Framework Modules] ayamgoreng:
what does iptables for ?

if I disable it lightningwall doesn't block any apps.
[Xposed Framework Modules] :
Yeah, that seems to be true after testing. Thank you for this awesome app!

----------------------------------------

Why there is no quick way to block every connection?
[Xposed Framework Modules] Ultimous:
Iptables is your Firewall

https://en.m.wikipedia.org/wiki/Iptables

Lightningwall use those as an additional layer to apply the rules for global firewalling ??

[MENTION=4501300]defim[/MENTION] ??

if I am using adaway , then LightningWall will use its iptables too ???
[Xposed Framework Modules] defim:
[MENTION=6556241]Musicbee[/MENTION]: You could use the template for this (it could also be changed by tasker etc)
[MENTION=6553990]Ultimous[/MENTION]: adawy is host file changer, so no problems. But then the destination is chnaged to local, because most time 127.0.0.1 is used
[Xposed Framework Modules] Yom:
LW gets "stuck" sometimes and have to disable/reenable to regain connectivity

Hi Defim

Donator user here, love your apps.

I am seeing a strange and annoying issue with LW under CM 5.1.1 on a Note 3. Sometimes when mobile data is enabled at the same time as WiFi, I have zero connectivity. Only way to get connectivity back is to go into LW's settings and disable/reenable it. Then connectivity returns.

Can you please fix? Also, what is the intent to send to LW to disable-reenable from Tasker?

Thanks!
[Xposed Framework Modules] defim:
Are you sure its not a Lollipop bug? I have a Nexus 7 (no mobile, only wlan) and if i dont use it a longer time, Wlan connection drops and the SSID is "disabled" in the Wlan manager. Or is it because of LightninWall :confused:

You could enabled connection state logging: Open settings and do 2x a long touch on the text at bottom. Then exit and reoben settings and more logging options are visible (dont enable all if you dont need...)

If my device lost Wlan, LW logs a "net-state" change from Wlan 2 unknown. But disable/enable LW does not fix it, only toggle Wlan or connect to SSID manualy.

There is no disable intent for Tasker :)
[Xposed Framework Modules] Yom:
Hi Defim,

Thank you for your reply. I am uncertain whether it is a Lollipop bug, it very well may be. I first noticed this issue when I had just gotten off a plane. The phone came out of airplane mode, no WiFi enabled, there was a strong 3G signal, but zero connectivity. Bouncing to airplane mode and back had no effect. Before I was going to reboot, I went into LW settings, disabled it, re-enabled it, and my connectivity worked. Then again at my destination, if WiFi was connected but mobile data enabled, I'd have no connectivity until I either disabled data, or bounced LW as I had before. Or disabling mobile data worked sometimes.

I have also noticed this when I disable WiFi and try to use mobile data, sometimes it won;t give connectivity until LW is bounced.

As this may very well be due to a bug in 5.1.1 or in the Alpha XPosed for 5.1.1, a temp fix until Xposed goes to beta (or release) or the bug is fixed in Android, could you please implement a way for Tasker to programmatically disable/enable LW?

Thanks sir.
[Xposed Framework Modules] defim:
Okay, i'll add tasker intent.

To hint the problem, you could try to enable all logging options and wait until connection drops. And then disable/enable and post the ~10 lines before and after the drop

UPDATE: Attached a version with enabled/disable actions. If you had latest release installed, no reboot should be needed
[Xposed Framework Modules] Yom:
Thank you, sir. I'll install it later. I assume the intent string to disable from Tasker is included in the change log?
[Xposed Framework Modules] :
I don't completely understand. How can I create a template that blocks everything? Usually I just want to to prevent all or only outgoing connections, it's time-consuming to block all 10 connection types one by one.
[Xposed Framework Modules] defim:
Not sure anymore :D But its on the "Tasker" view in the app menu>Tasker

The template view could be found by menu>Template (if you have installed donation app!)
[Xposed Framework Modules] :
OK, that's only a feature in the donation package ;)
[Xposed Framework Modules] defim:
Sry, i forget sometime which features are part of it. I should read OP myself o_o
[Xposed Framework Modules] Yom:
3.5.1 does not see the donator app

Hi Defim,

The latest LightningWall does not turn into donate version with the latest donator app
[Xposed Framework Modules] defim:
[MENTION=303421]Yom[/MENTION]:

had you restarted LightninWall after donatur update? You could do this by touch yellow/green bar.

And can you please check the state on the bottom of the main screen in the donate app? Is it okay/verified and result in details OK? If not you could have restricted "Google Play Services" with a firewall.

If just the main app does the other not detect, it could be caused by Xprivacy ("usage date" should help) or Greenify. These two are reported to cause problems, but i dont know exactly which options
[Xposed Framework Modules] Yom:
Hi Sir,

LightningWall .1.4 worked just fine after the donator app update. Once I install LW .5.1 it does not register as donator version. If I uninstall LW and install the one you attached to this thread with the tasker disable intent support it immediately recognizes the donator app. The donator app says both License Verified and License Okay. I do not run Xprivacy or any other permission changers. I do use Greenify, but the previous LW version had no problem seeing the donator app.

Maybe an issue with the donator check code in the latest LW version? I doubt it is an issue wiht the donator app itself...

Thanks!