This repository was archived by the owner on Aug 14, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 14, 2020. It is now read-only.
apps cant connect to anything on orwall 0.16+ #29
Copy link
Copy link
Closed
Description
#24 (comment)
so i've been using 0.15 since like i said, 0.16 and 0.17 would keep complaining about the bootup rules, and whether or not i choose 'dismiss' or 'apply bootup rules', nothing would work. the popup keeps coming even after reboots. i updated to 0.18 this morning, and same problem. it also seems to try doing a lot of things the first time i open it on each boot, because i get tons of superuser popups for orwall, even if i choose to dismiss the bootup rules popup, so i think it still tries something.
Samsung Galaxy S4 (GT-I9505)
Android 4.3 (CyanogenMod 10.2)
orWall 0.18-beta
iptables -vnL
iptables -vnL
Chain INPUT (policy DROP 1 packets, 617 bytes)
pkts bytes target prot opt in out source destination
1072 68543 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 10064 ctstate NEW,RELATED,ESTABLISHED /* Allow Orbot inputs */
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED /* Allow related,established inputs */
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 oem_fwd all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 fw_FORWARD all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 bw_FORWARD all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 natctrl_FORWARD all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy DROP 96 packets, 6048 bytes)
pkts bytes target prot opt in out source destination
0 0 accounting_OUT tcp -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 10064 tcp dpt:9030 /* Forward Directory traffic to accounting */
1074 68671 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 10064 ctstate NEW,RELATED,ESTABLISHED /* Allow Orbot outputs */
0 0 ACCEPT udp -- * * 0.0.0.0/0 127.0.0.1 owner UID match 0 ctstate NEW,RELATED,ESTABLISHED udp dpt:5400 /* Allow DNS queries */
Chain accounting_IN (0 references)
pkts bytes target prot opt in out source destination
0 0 bw_INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 bw_INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain accounting_OUT (1 references)
pkts bytes target prot opt in out source destination
0 0 bw_OUTPUT all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 bw_OUTPUT all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain bw_FORWARD (1 references)
pkts bytes target prot opt in out source destination
Chain bw_INPUT (2 references)
pkts bytes target prot opt in out source destination
0 0 all -- * * 0.0.0.0/0 0.0.0.0/0 ! quota globalAlert: 2097152 bytes
62 14405 all -- * * 0.0.0.0/0 0.0.0.0/0 owner socket exists
Chain bw_OUTPUT (2 references)
pkts bytes target prot opt in out source destination
0 0 all -- * * 0.0.0.0/0 0.0.0.0/0 ! quota globalAlert: 2097152 bytes
71 6473 all -- * * 0.0.0.0/0 0.0.0.0/0 owner socket exists
Chain costly_shared (0 references)
pkts bytes target prot opt in out source destination
0 0 penalty_box all -- * * 0.0.0.0/0 0.0.0.0/0
Chain fw_FORWARD (1 references)
pkts bytes target prot opt in out source destination
Chain fw_INPUT (0 references)
pkts bytes target prot opt in out source destination
Chain fw_OUTPUT (0 references)
pkts bytes target prot opt in out source destination
Chain natctrl_FORWARD (1 references)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain oem_fwd (1 references)
pkts bytes target prot opt in out source destination
Chain oem_out (0 references)
pkts bytes target prot opt in out source destination
Chain penalty_box (1 references)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 10077 reject-with icmp-net-prohibited
iptables -vnL -t nat
iptables -vnL -t nat
Chain PREROUTING (policy ACCEPT 1 packets, 617 bytes)
pkts bytes target prot opt in out source destination
14 5469 oem_nat_pre all -- * * 0.0.0.0/0 0.0.0.0/0
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 96 packets, 6048 bytes)
pkts bytes target prot opt in out source destination
0 0 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 10064 /* Orbot bypasses itself. */
0 0 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 10087
20 1200 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 10064 /* Orbot bypasses itself. */
10 703 REDIRECT udp -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 0 udp dpt:53 /* Allow DNS queries */ redir ports 5400
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10054 /* Force org.adaway through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10055 /* Force org.mariotaku.twidere through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10056 /* Force net.osmand.plus through TransPort */ redir ports 9040
2 120 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10062 /* Force com.eddypcz.dnschanger through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10063 /* Force net.andchat through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10077 /* Force org.videolan.vlc through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10079 /* Force info.guardianproject.otr.app.im through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10084 /* Force org.mozilla.firefox through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10086 /* Force org.fdroid.fdroid through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10087 /* Force com.Mata.YTplayer through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10088 /* Force com.danvelazco.fbwrapper through TransPort */ redir ports 9040
4 240 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10092 /* Force jp.naver.line.android through TransPort */ redir ports 9040
1 60 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10094 /* Force com.whatsapp through TransPort */ redir ports 9040
0 0 REDIRECT tcp -- * * 0.0.0.0/0 !127.0.0.1 tcpflags: 0x17/0x02 owner UID match 10095 /* Force dentex.youtube.downloader through TransPort */ redir ports 9040
0 0 REDIRECT udp -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 0 udp dpt:53 /* Allow DNS queries */ redir ports 5400
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
53 3341 natctrl_nat_POSTROUTING all -- * * 0.0.0.0/0 0.0.0.0/0
Chain natctrl_nat_POSTROUTING (1 references)
pkts bytes target prot opt in out source destination
Chain oem_nat_pre (1 references)
pkts bytes target prot opt in out source destination
(how do i use spoiler boxes)
Metadata
Metadata
Assignees
Labels
No labels
Activity
cjeanneret commentedon Aug 26, 2014
Hello,
Yep, there was a nasty bug in 0.16, that's why I pushed 0.17 few hours
after 0.16.
Just small questions regarding your Android:
For what I can see in your rules, the "witness" chain is missing, making
the pop-up appear.
But this pop-up should not appear if your android doesn't support
init-script, thus there's probably a mix-up with this part.
Cheers,
C.
cjeanneret commentedon Aug 26, 2014
Ho, and, also:
android 4.3.x doesn't have the super-update making all DNS queries go
through some caching-proxy… THAT explains why you don't have network
anymore.
~> I'll push a new release shortly in order to re-add the dns redirect.
Added back per-app DNS redirection and authorization
hxe commentedon Aug 26, 2014
well my problem relates to 0.16+, so 0.17 and 0.18 included right now. and how would i check if my android supports init-script? im guessing it does? because /system/etc/init.d contains:
00banner
50selinuxrelable
90userinit
91firewall
and i guess i should also update cyanogenmod soon for that 4.4 android
hxe commentedon Aug 26, 2014
i've updated to android 4.4.2. should i update orwall to 0.18 now? or wait for the next update
cjeanneret commentedon Aug 26, 2014
Would be interesting to give a try to 0.18. It should provide connectivity.
Would be also interesting seeing why orWall cannot push its init-script. What android "flavour" are you using?
hxe commentedon Aug 26, 2014
https://img.bi/#/LrJnFRt!S74VWHuHqaeYr3dXH7dSejJiYX9xgCNa3vzahny5
and i just updated orwall. should i open orwall first (it will probably give that notice), or should i reboot first and then open orwall?
cjeanneret commentedon Aug 26, 2014
Heya!
you should start the app in order to ensure it migrates the configuration to sqlite. It should also install the init-script… hopefully.
Once it's done, you may reboot.
hxe commentedon Aug 26, 2014
still the same problem. had to downgrade to 0.15 again
cjeanneret commentedon Aug 27, 2014
Weird… any chance you have something else playing with iptables? Some
chains in your output don't seem to be "stock chains"…
Having here CM 4.4.4 on nexus4 works like a charm. As well as on a
nexus7 with SlimKat. And on an HP Slate 7, rooted stock 4.1.1…
hxe commentedon Aug 27, 2014
nothing else should be doing it. ive tried it with both orbot set to use its own iptables, and with orbot using the in built iptables. afwall isnt installed. idk. what changed after 0.15? why does it work fine until that update? i will do some more tests and paste iptables output how it currently is, how it is with latest orwall, and how it is without orwall at all.
cjeanneret commentedon Aug 27, 2014
Before 0.16, there were some generic rules allowing allo apps to connect
to localhost on orbot ports (socks, transproxy and dns).
There were also per-apps rules for DNS, until I find out there were, on
my systems, something else making ALL dns queries from UID 0 instead of
the app.
0.16 was broken, don't try it.
Basically, it removed the generic rules in order to provide a more
secured way to filter apps, ensuring only the one you select can go
through transProxy.
You may be interested in the following commits:
ae43a83
0c8cfd4
0.17 was a correction for 0.16, still with the same rules (modulo 1-2
corrections). It might have been called 0.16.1 in fact ;).
0.18 moved NAT preferences to sqlite in order to provide a better
support for coming features
0.19 WILL (not yet released) add back DNS rules based on App UID, which
were removed in 0.16 due to the UID 0 stuff. The current 0.19 candidate
works on my android 4.1.1. I still have to test it on a more recent
version (4.4.4).
Current status on my different devices:
0.18 works on all my devices (4.1.1, 4.4.4 CM and 4.4.4 SlimKat)
0.19 tested on 4.1.1 successfully, still needs tests on 4.4.4
I'll also try:
patcon commentedon Aug 27, 2014
@hxe I realize it's a pain, but what about diffing the log outputs of iptables between 0.15 and 0.16, then installing 0.15 and using
adb shellto manually add each iptables change until things start working? Then work backwards to find out why that specific thing changedcjeanneret commentedon Aug 29, 2014
"should" work with 0ac57f0 — will be integrated in next release. Probably Sunday, I have some tests to do with the code refactoring I made.
cjeanneret commentedon Aug 31, 2014
release is out. @hxe mind to test it with your setup?
20 remaining items
hxe commentedon Sep 13, 2014
oic. and yeah maybe with busybox now working, the initscript will work. ill install 0.20 and reboot
hxe commentedon Sep 13, 2014
it didnt complain about the rules this time. so i guess the initscript works. but my apps cant seem to connect to anything.. should i maybe flush iptables rules or something and then restart? and then just do the iptables debugging etc again
hxe commentedon Sep 13, 2014
ok i flushed iptables, restarted, opened orwall, it crashed before opening, opened it again successfully. tried apps, they didnt work. unticked firefox and then reticked, it started working. did the same with twidere. so im just reticking all my apps right now and that will fix it hopefully
cjeanneret commentedon Sep 13, 2014
ok, so init is OK.
now, regarding iptables: it's flushed on boot, when orwall starts, in order to ensure there is no parasite.
For what I can see on my side, it's working without any weird trick. If you're upgrading from 0.16 (or 0.15), your settings should be migrated to sqlite, as I added support for that lately in order to provide more possibilities (it's on the way)…
Just try to reboot once you ticked again the app, I think the problem isn't that "easy".
cjeanneret commentedon Sep 13, 2014
(migration to sqlite: https://github.com/EthACKdotOrg/orWall/blob/master/app/src/main/java/org/ethack/orwall/MainActivity.java#L361 )
hxe commentedon Sep 13, 2014
yeah i just rebooted again. it seems on every reboot, i get a notice saying that orwall has stopped working. then after that, the usual notices from superuser, of orwall using sudo. and then apps dont work on boot. i have to go in to orwall and untick then tick all of the apps i want again, for them to start working. once i do that it works fine. even tethering seems to be working fine, even though u said in the other thread that it doesnt. though i havent turned off tethering yet or done any other tests yet
hxe commentedon Sep 13, 2014
so seems maybe most of the old issues were to do with me not having busybox. the only real issue now is: orwall crashing on boot for some reason? which causes me to have to retick each app in the list on each boot. then it works fine
cjeanneret commentedon Sep 13, 2014
hmm… pretty sure orwall doesn't apply its startup rules if it crashes on boot… Can you display the iptables rules right after the boot?
Recall:
hxe commentedon Sep 13, 2014
so the migration to sqlite is meant to explain maybe having to re-tick the apps? but im having to do that on each boot. orwall still crashes on every boot, confirmed. this is iptables after booting:
how will we know if its an orwall issue, or whether my new busybox install is causing orwall to crash? busybox seems to have fixed the initscript right? and also let me run a lot more binaries than before.
hxe commentedon Sep 13, 2014
or it could be related to my tethering settings? ill just disable all tethering related options and check first
hxe commentedon Sep 13, 2014
ok every time i toggle "Enable LAN connections" in orwall now, it causes the app to stop working, but the setting seems to stick. i unticked all special network options i had ticked in orwall. will reboot now
hxe commentedon Sep 13, 2014
yep! that was the problem. having "Enable LAN connections" ticked in orwall, was causing it to crash on boot, requiring me to re-tick each app manually. having it unticked and booting makes everything work fine! that option is now broken though
hxe commentedon Sep 13, 2014
hmmm, should close this issue then? i guess 0.20 works for me. just have to look into the other things like tethering and lan connections etc. ill open an issue for the lan connections option crash. do people usually have busybox working on their phones? what if other people experience the problems i did because they dont have busybox? should orwall need to check that or something? i really dont know why there was a 'busybox' file in /xbin/ and a lot of apps linked to that. but i didnt have the actual busybox installed?
cjeanneret commentedon Sep 13, 2014
I'll see what I can do regarding working busybox. A simple test in order to ensure exec exists and is executable should be enough.