yashsingh1/xdaforums huggingface dataset:
[Xposed Framework Modules] iwanttoknow:
[MENTION=4501300]defim[/MENTION]

Thanks a lot for your reply.

You wrote :

"If you want to use iptables with LW, just enable the checkbox in the settings (and grant root if requested)."

My questions :

1) Is LW which will generate iptables rules in this case ? If yes, are iptables rules regenerated each time you boot your smartphone, before launching Internet connection ?

2) Can I disable Root with SU after enabling the checkbox in the settings of LW ?

3) After, if I disable the checkbox in the settings for iptables in LW :

3a) What become of the rules defined in iptables ?

3b) Will they be erased from iptables, and iptables will have the same content as before enabling the checkbox in the settings of LW ?

I'm really sorry if my questions are too basic.

;)
[Xposed Framework Modules] defim:
[MENTION=7545844]iwanttoknow[/MENTION]

1) Rules are applied if needed, also at boot

2) No, thats the disadvantage of iptables, it needs root (Xposed doesnt need root, only on Android 4.x devices for install)

3) To check/list the rules just use the "iptables" command in a (root) terminal or adb like on any linux (desktop etc). A kernel starts always without any defined rules
[Xposed Framework Modules] iwanttoknow:
[MENTION=4501300]defim[/MENTION]

Thanks for your reply.

Is LW which generates iptables rules from my input/output restrictions I made in its user interface ?
[Xposed Framework Modules] defim:
[MENTION=7545844]iwanttoknow[/MENTION]: Yep

Btw, with iptables checkbox enabled, there are some items of linux system added to the main list (which are not visible for Java/Xposed)

Some years ago, before Xposed and this app, iptables was nor very reliable. On my old Defy up to Android 4.4 CyanogenMod sometimes nothing was applied by iptables
[Xposed Framework Modules] iwanttoknow:
[MENTION=4501300]defim[/MENTION]

Thanks for all your answers.

I understand better LW possibilities.

But I still don't know what application it's better that I use : LW or AFW+ . They seem to be very similar.
[Xposed Framework Modules] defim:
[MENTION=7545844]iwanttoknow[/MENTION]: As the developer, my app is for sure better :D

Xposed and its modules are loaded with Android. So there is no need to apply on every start the rules again. This reapplying could take some time (For making the whole boot time visible, you could check with my small app "WholeReady").

On my Defy i had problems with a iptables-app, it was before LW exists. On connections changes (eg wifi <> mobile) the rules where not applied reliable, sometimes it took much time or nothing was applied at all. And blocked apps had access to internet. With LW the connection state/type is taken "inside Android" so its always the real current state without any delay
[Xposed Framework Modules] Yom:
Hi Defim!

Love this app!

latest version has this issue of not blocking the Telegram app... my wife sends me, um, spicy pics throughout the day and I don't want Telegram to get the messages until I unblock it in LW after I leave the office... it's blocked, red, and still connected.

Any ideas?

---------- Post added at 12:27 PM ---------- Previous post was at 12:20 PM ----------

Also... sometimes, when switching network modes (2g to 4g, or to WiFi) I have to disable and reenable LW for connectivity to be restored. Can you please let me know what I need to send you in order to troubleshoot these issues?

Danke schoen!
[Xposed Framework Modules] defim:
[MENTION=303421]Yom[/MENTION]: Maybe connection state is not detected correctly. You coudl show mor logging options: In settings do 2x a long-toch on the last text line. Then closse settings and reopen. Now some more checkboxes are at bottom. It is also logged to logcat in case you have a computer attached.
[Xposed Framework Modules] RFrancis:
Is there a way to use this to make sure an app only goes through orbot and doesn't have access to regular internet?
[Xposed Framework Modules] defim:
[MENTION=2935458]RFrancis[/MENTION]: I dont know "orbot ", but you could set per app to only access local lan but not internet. In case orbot is a kind of proxy this should work
[Xposed Framework Modules] sgeto:
Can someone explain how URL logging works? It never worked for me. I'm trying to get this to work for a while now. Except for two general entries (version and initialised), the Logfile is always empty.

So in short: What do I need to enable make the app log all GET requests made by others apps (or the whole phone) and where can I find the logfile?

Thanks a lot!
[Xposed Framework Modules] defim:
[MENTION=5571878]sgeto[/MENTION]: Ths app can log only the host/port at connection, the URL is send as a data packet through the established connection. This is not hooked/monitored by this app.

If logging is not working, you have maybe restricted something with Xprivacy etc? Note the app runs in conext of Android so not only restricting the app could cause problems!
[Xposed Framework Modules] sgeto:
You know what? It just worked! Android/CM's "new" permission is really hard to keep in mind. Among other things, I had to manually grant Modify System Settings Permissions to the app, which in CM is hidden deep inside privacy's guards advance settings, and root access, AND reboot. :D

But you're right, the app only logs hostnames. That's very unfortunate. The the only two apps I know who can do that are SandroProxy and Adblock Plus for Android .

Both are outdated, loud (both use iptables + custom cert in SandroProxy), and clumsy in their own ways (Adblock Plus' URL log can only be viewed via logcat and SandroProxy is very resource hungry etc)

I tried TCPdump for a while but it can't log secure URLs (starting with https) and, to be honest, using CLI apps is very cumbersome and impractical.

Anyways would be cool if you could consider adding a full URL log. I'm of course not demanding anything or tell you how you write your apps. It's just a polite feature request. I'd do it myself, but I'm sadly not a programmer.

Anyways let me know what you think.

If you're looking for inspiration, there an interesting xposed module called Runscope Everything. It's unmaintained and designed for a completely different purpose than LightningWall, but I noted that its (two?) hooks enable it to view and rewrite almost all GET requests. Those it didn't catch are those that have pinned certificates or used use different means (internal) of connecting to the internet. Maybe something can be done there too.

Anyways, I'm talking too much. :D:D That's for clarifying and so long!
[Xposed Framework Modules] defim:
[MENTION=5571878]sgeto[/MENTION]: Root should only be needed/used when iptables is enabled in the settings. I'm using CM13 on my S4active, where could i find the "Modify System Settings Permissions"? :confused:

URL logging could not be added, as the establishing of connections is hooked, and at this point the URL is not known: First 1 connections is established, then the client sends a "GET" command through this with the desired URL.

Btw, i'm using "httpry" on my router if i want to check something - but it has no HTTPS support. Maybe some proxy wiht logging helps, eg on a computer at local lan. But then you need the certificate of the proxy on the Android device
[Xposed Framework Modules] sgeto:
I'm on a custom ROM based on CM13 and the permission to allow apps to modify system settings is found in two places:

1. Settings - Apps - Tap the cogwheel icon in the in the upper right corner - Modify System Settings

(I've seen that the option to grand this permission is sometimes grayed out. Not sure why.

2. Settings - Privacy - Privacy Guard - Tap the three dots on the upper right and chose "Advanced" - Swipe to the "Device" section, those apps have or need this permission.
[Xposed Framework Modules] defim:
[MENTION=5571878]sgeto[/MENTION]: Thx! These options are heavy hidden :) First, i'm using CM13 2016-12-28 on my S4active (this is my mobile phone, Nexus 7 for development)

> 1. Settings - Apps - Tap the cogwheel icon in the in the upper right corner - Modify System Settings

There is none of my apps listed!

Maybe LightningWall appears there, if the flightmode option is enabled, Xposed failed somehow and LW tries to enabled flightmode?

> 2. Settings - Privacy - Privacy Guard - Tap the three dots on the upper right and chose "Advanced" - Swipe to the "Device" section, those apps have or need this permission.

Maybe you have set (translated) "enable privacy for new installed apps"? I've not :) But there are not much critical things

But good to know this could cause problems!
[Xposed Framework Modules] sgeto:
The new android permissions have caused me a lot of headache. It's weird that they're not equal on all devices. Anyways, glad I could help.

Keep it up!
[Xposed Framework Modules] Robert342:
Can you add function in settings for hide all system apps from list? For moderate and see only user apps. Cherrs.

Sent from Oukitel K10000 (Android 5.1)
[Xposed Framework Modules] defim:
[MENTION=6092731]Robert342[/MENTION]: If the option is enabled to *see* only non-system apps, what should then happen with sytem apps? Should they threaded as configured (which is not visible then) or existing settings completely ignored ?
[Xposed Framework Modules] Robert342:
Not visible only, I think.

Sent from Oukitel K10000 (Android 5.1)
[Xposed Framework Modules] defim:
[MENTION=6092731]Robert342[/MENTION]: I'll add something soon :cowboy:

EDIT: Just uploaded to PlayStore
[Xposed Framework Modules] 123xdagsm:
Thanks

Please add sort status and show custom settings on the top
[Xposed Framework Modules] defim:
[MENTION=3805419]123xdagsm[/MENTION]: All 3 not used icons should be visible on action bar, but they could be moved to the menu if not much space is available. To test put the devie into landscap mode
[Xposed Framework Modules] android404:
Hey. My first day with this app and I got the same issue. The log doesn't show anything that seems important. More than that: I block the exact same apps as I did in afwall+ before without issues. Did you find a solution?
[Xposed Framework Modules] android404:
Or this: why does YouTube not work, even though the log is plain green?
[Xposed Framework Modules] defim:
[MENTION=5077402]android404[/MENTION]: Youtube should work if not blocked. Maybe somehow disabled wiht oder apps/modules?

Logging .. hm, dont know. What is on your device like on nicesoni_ash's? Should be something non-AOSP because i never had this with stock Nexus 7
[Xposed Framework Modules] j03x2:
Appears to block certain apps, but not all despite clear blockage settings. Google Play is successfully blocked for instance, while whatsapp is neither blocked by "i don't trust this app" or configured template.

Could this be custom kernel related? I'm using Dorimanx OP3T kernel on 6.0.1 Stock ROM. XPrivacy was disabled for the donation and LW app. Amplify is set to block GPS related stuff (and not network-related). This was tested with AFWall en- and disabled.

https://xdaforums.com/oneplus-3t/development/mm-6-0-1-oxygen-3-5-4-kernel-3-18-48-t3567781
[Xposed Framework Modules] defim:
[MENTION=4787138]j03x2[/MENTION]: Can you see in the logfile the connections of WhatsApp? It could be that Google (Play) Services are used and you need to block them (but this block all other apps which use them)
[Xposed Framework Modules] defim:
Sry, posted twice
[Xposed Framework Modules] j03x2:
I made configurations so that all applications including system apps should be blocked. Therefore, I would have assumed that this includes Google (Play) Services.

Yes, I can see the WhatsApp connections (and also some other apps that were allowed despite blocking all apps).

Just to make sure, I made further test variations:

-AFWall+ disabled

-AFWall+ enabled (afaik should also work in theory due to different mechanisms)

-reinstallation of LightningWall

Magisk & Xposed:

-Systemless Magisk SU

-Magisk: OP3T WiFI Channel Bonding

-Xposed: Youtube Adaway, XPrivacy, XposedUnifiedNlp, Xposed edge pro, Xblast, GravityBox, BootManager, Android-Nify, Amplify, AFWall+, 3C Toolbox
[Xposed Framework Modules] defim:
[MENTION=4787138]j03x2[/MENTION]: So you see connection attemps of WhatsApp listed in the logfile of LightningWall, it shows that not allowed but it is allowed?

btw, if you set not hide to system apps / shared uids in the settings, they are listed in the main list of the app and you could configure them then, if you dont configure them manually the template is used.
[Xposed Framework Modules] j03x2:
System Apps are already shown in the list.

With the current template all apps should be blocked like in flight mode. However, the log says that certain apps are allowed (green color, TX allowed). I tried distrusting Whatsapp as an alternative to the template setting, but that didn't change anything (same result).

All available connection modalities (VPN, Wifi, Unknown, Ethernet etc. are set to be blocked).

EDIT: Would screenshots be useful (settings, log) ?
[Xposed Framework Modules] defim:
[MENTION=4787138]j03x2[/MENTION]: Should not be listet as allowed if configured as not allowed in the app... Have you a x64 device? Some reported for other apps that settings are not correctly with such a device. Possible that the x64 problem occurs only with Magisk
[Xposed Framework Modules] j03x2:
Yes, arm64v8a. (Oneplus 3T)

So it's unlikely to be kernel mod-related?

(Dorimanx 0.8 PWR Core)

Can this issue be fixed?

Almost all Xposed mods are working so far (except XBlast)
[Xposed Framework Modules] defim:
[MENTION=4787138]j03x2[/MENTION]: Yes, as far as i read it depends on x64 precoessor archticture (but seems only for Magisk). Hopefully i get a x64 device to test by myself
[Xposed Framework Modules] ChAoSWK:
Hello,

thank you for that great module. I tried it on my Galaxy S5 with resurrection remix rom 5.7.4 (Android MM 6.01) and boeffla Kernel 3.5 for CM13 (3.4.17). I DL the module, activated it and rebooted.

In Apps for example I completely deny the opera browser (logging enabled). I open opera and can normally use the Internet. In logging there are about 20-30 entries denied for opera and thats all, even when I use more opera and internet, there are no new entries. I tried with iptables and complete root functions also I checked "modify system settings" in the two sections under apps and privacy.

Any idea why it is not working for me?

Thx

Dirk
[Xposed Framework Modules] defim:
[MENTION=5408719]ChAoSWK[/MENTION]: Should be because of the problem UnbelovedHosts also has: Xposed works only for Android (Java), not the native (linux) part. Most browsers use some sort of proxy to reduce the data and save bandwith. I've also added it now to OP (Doplhin with JetPack should still work)
[Xposed Framework Modules] Atrate:
[MENTION=4501300]defim[/MENTION]

Hey man, are there any known VPN bugs?

It seems that the app just doesn't detect my VPN connection and the VPN options do noting.

(RR, Magisk Xposed on Nougat, but it occured before on Lollipop and Marshmallow)
[Xposed Framework Modules] nilanko:
Simply doesn't work. Using on redmi note 4 with miui 8.2.10.0 based on Marshmallow. x64 SD 625.
[Xposed Framework Modules] defim:
[MENTION=5215273]TheClownDE[/MENTION]: The apps hooks itself, and if this hook is not working the message is shown. If Xposed is working and the module loaded, maybe another module interfers somehow? Or maybe only this single hook does not work but the moduel works?

[MENTION=7317381]MegaArthur[/MENTION]: I did some testes wiht "hide.me" VPN app on Nougat (LineageOS) and could not find any errors. You could enable more logging messages which show detected und used network modes by do two time a long touch on the last text line in the settings. Then close settings and reopen to enale logging options

[MENTION=5888184]nilanko[/MENTION] Some message boxes? Some log entries?
[Xposed Framework Modules] Atrate:
Not working. I have set Slide to connect ONLY through VPN, I had my VPN on and this happened:

2017-10-11 22:24:26 LightningWall 3.9.2 {392-1282925-F568BBD54D14B3CD00657FCF3FDED49A-20170727} A201E

2017-10-11 21:54:44 Initialized

2017-10-11 22:23:32 allows TX: XDA Labs (com.xda.labs) == labs-lb.xda-developers.com:443 (34.204.151.235)

2017-10-11 22:23:33 allows TX: XDA Labs (com.xda.labs) == vigor.web.va.us.xda-developers.com:443 (207.244.72.8)

2017-10-11 22:24:33 net-modus: W-Lan (=W-Lan)

2017-10-11 22:24:33 denies TX: Slide (me.ccrama.redditslide) == oauth.reddit.com:443 (151.101.61.140)

2017-10-11 22:24:33 net-modus: W-Lan (=W-Lan)

2017-10-11 22:24:33 denies TX: Slide (me.ccrama.redditslide) == oauth.reddit.com:443 (151.101.61.140)

2017-10-11 22:24:34 net-modus: W-Lan (=W-Lan)

2017-10-11 22:24:34 denies TX: Slide (me.ccrama.redditslide) == oauth.reddit.com:443 (151.101.61.140)

2017-10-11 22:24:35 net-modus: W-Lan (=W-Lan)

2017-10-11 22:24:35 denies TX: Slide (me.ccrama.redditslide) == oauth.reddit.com:443 (151.101.61.140)

2017-10-11 22:24:36 net-modus: W-Lan (=W-Lan)

2017-10-11 22:24:36 denies TX: Slide (me.ccrama.redditslide) == oauth.reddit.com:443 (151.101.61.140)

2017-10-11 22:24:37 net-modus: W-Lan (=W-Lan)

2017-10-11 22:24:37 denies TX: Slide (me.ccrama.redditslide) == oauth.reddit.com:443 (151.101.61.140)

2017-10-11 22:24:38 net-modus: W-Lan (=W-Lan)

2017-10-11 22:24:38 denies TX: Slide (me.ccrama.redditslide) == oauth.reddit.com:443 (151.101.61.140)

2017-10-11 22:25:04 net-modus: W-Lan (=W-Lan)

2017-10-11 22:25:04 allows TX: XDA Labs (com.xda.labs) == labs-lb.xda-developers.com:443 (34.195.26.191)

2017-10-11 22:25:06 net-modus: W-Lan (=W-Lan)

2017-10-11 22:25:06 allows TX: XDA Labs (com.xda.labs) == vigor.web.va.us.xda-developers.com:443 (207.244.72.8)

2017-10-11 22:25:24 net-modus: W-Lan (=W-Lan)

2017-10-11 22:25:25 allows TX: XDA Labs (com.xda.labs) == vigor.web.va.us.xda-developers.com:443 (207.244.72.8)

2017-10-11 22:25:39 net-modus: W-Lan (=W-Lan)

2017-10-11 22:25:39 allows TX: XDA Labs (com.xda.labs) == vigor.web.va.us.xda-developers.com:443 (207.244.72.8)

XDA Labs were set to allow all.

I am using a VPN in the StrongSwan VPN client, but I've also noticed it in the NordVPN app, which uses OpenVPN.
[Xposed Framework Modules] defim:
[MENTION=7317381]MegaArthur[/MENTION]: Yes, because the app dectect the current status as not connected by VPN but just Wlan. I tested also with an OpenVPN where detection also woked. You could the the log files after you toggled the vpn on/off. Btw, in the settings you could chose between 2 ways to detect the vpn state!
[Xposed Framework Modules] Atrate:
Oh, it works now. Thanks!
[Xposed Framework Modules] TheClownDE:
Thanks for your help.

I think it was a problem with the unofficial xposed Framework. Yesterday I installed the official 88.1 and now everything seems to work.
[Xposed Framework Modules] defim:
[MENTION=5215273]TheClownDE[/MENTION]: Yes,thats possbile. With official release all the mdoules are working better, even all together :D
[Xposed Framework Modules] Atrate:
[MENTION=4501300]defim[/MENTION]

I found a problem with LW and VPNs again. I use an IKEv2 VPN, which still works after connectivity change, for example when wofi disconnects and mobile data connects, but then LightningWall detects the network as NOT VPN and blocks my apps.
[Xposed Framework Modules] defim:
[MENTION=7317381]MegaArthur[/MENTION]: Can you check the log (after enabling the options) which mode was used and if the vpn on/off switch is recognized correctly? Did you tried both modes to detect vpn?

There are some reports about vpn detect issue, but i can see what the common cause is
[Xposed Framework Modules] Atrate:
Both in compatibility mode and normal the detection doesn't work if I switch networks (Moblile to Wi Fi and otherwise) If I connect to the VPN, it recognizes it, but only until I change from Mobile to Wifi or the other way around (VPN stays connected in the background, but LW doesn't treat the mode as VPN then) Do you want both log files?

Also, wouldn't it be possible for the app to periodically check whether a VPN is connected witg eg. https://stackoverflow.com/questions/28386553/check-if-a-vpn-connection-is-active-in-android?
[Xposed Framework Modules] defim:
[MENTION=7317381]MegaArthur[/MENTION]:

Thanks! Yes, checking periodically if VPN is active would help, but this would need a little ressources for the checks

You wrote you are using wifi or mobile, then you connect vpn. So far the apps detect correct Now you switch wifi>mobile or mobile>wife. Now the app has to recognize *not* vpn, because the vpn-*connection* has to reestablish! If you switch wifi<>mobile you get a new/another ip and the vpn server needs always to know your current ip where to send you data.

Maybe this is the cause? Could it be the vpn uses alwasy the mobile and so it is no reestablished on mobile/wifi change?

Btw, logs are always good :)
[Xposed Framework Modules] Atrate:
I am using StrongSwan, which uses the IKEv2 with IPSec protocol. This means that on changing wifi<>mobile, the connection doesn't need to be re-estabilished and instead still just works, over the changed network.

(I removed some IPs)

https://ghostbin.com/paste/o5as3

In the log, I was connected to the VPN the whole time and also reconnected later.
[Xposed Framework Modules] Hurkamurka:
Hi there!

Maybe i am a noob, but how should i use the app? Let's start from the beginning:

1. downloaded the app from xposed repo

2. installed it

3. enabled the module in xposed

4. reboot

5. opened the app

6. i set my browser to test it --> click to the browser --> wrench icon --> set everything to deny (all is going to be redish)

7. press home

8. open browser --> i'm still able to open webpages (this happens also if i set the app with the thumbs down icon)

So my question: what am i missing?

Thanks any help!
[Xposed Framework Modules] defim:
[MENTION=7317381]MegaArthur[/MENTION]: In the log is visible

1) connect to mobil

2) switch to wlan

3) establish tp vpn

There is no reconnecto to VPN, and also a later change mobile<>wlan is missing?

[MENTION=7056221]Hurkamurka[/MENTION]: Many browsers use proxy or native access, Please see OP of UnbelovedHosts thread, its the same. In LightningWall you could enable additional iptables support
[Xposed Framework Modules] Atrate:
The VPN was active before I turned on logs, also I haven't edited anything else except the IPs.
[Xposed Framework Modules] Yom:
Hi Defim! Love all your awesome apps!

I have been having a problem with LW... every time my connection changes (from WiFi to data, or from 2G to LTE, or vice-versa) All my apps lose connectivity until I disable and reenable LW in its settings, or have Tasker send intents to do the same. Could you please tell me what logs or troubleshooting I should perform to assist you in killing this bug?

PS: BTW, Compat modemakes no difference. I'm also running IPTables.
[Xposed Framework Modules] defim:
Hm. i dont know why now multiple reports about not correctly detected connections states appears. I've got also by mail.

Pleas enable the hidden logging options (see some posts before) and activate. Then toggle mobile/wlan/vpn as you do usal and the failure appears. The see the log what the app do detect or if there is nothing logged/detected. I helps to know which way you establish the vpn (best case: i could try it by myself).

I've got so far no log which helps me to find it :(
[Xposed Framework Modules] alxtorrentazos:
Hi defim, thank you for such wonderful application that you gave us :)

If you dont mind I would like to ask if it´s possible to use your app to block the access to certain sites/ips......for example, I use an app to check the weather and I can see it connecting to it´s site for that, but also it connects like 73 times to google, facebook, etc. And this is just an example of how bad new apps are doing this days.

I´m new to all this firewall world in android but I´m still wanting some control over my connections.

Thanks in advance to you or anyone else who can provide some information about this :)

Alx
[Xposed Framework Modules] defim:
Feel free to write you own and publish it where you want and with a license you want. If you don't see any advantage, you seems to missed reading the OP