[CLOSED][Request] Magisk TTL Kernel Module for IPTABLES & IP6Tables (Oreo & Pie) - LG V30 Questions & Answers

I'm offering a $50 bounty to anyone who can create a custom stock Oreo Kernel that has the TTL module in iptables and ip6tables. I need to change the TTL and Hop Limit to bypass a hotspot restriction for an iot device. Either I pay $50 USD/mo service, or I pay $5 a month unlimited at 2g speeds but no hotspot (T-Mobile MVNO). I can only bypass if I tether like this:
1. LG G6 Unrooted with SIM HOTSPOT ON (no Internet access because of TTL)
2. LG V30 rooted with TTL set to 66 via TTL Master app (client to #1, LG G6) HOTSPOT ON (no Internet access because of TTL)
3. Actual linux client to the V30 (#2) (Internet access checks out, works! Because TTL is 64 at this point)
Even if I hotspot from the V30 with a TTL anywhere from 61-69, the data on the actual client #3 is blocked. The client (#3) is a smart plug running it's own little linux OS and obviously has a TTL of 64. I don't want to bother modifying its firmware. I set my APN settings to IPv4 only to no avail in this case.
I also set my APN to IPv6 only and changed the hop limit on my V30 from 61-69 with sysctl to see what would work, but data was still blocked.
(about 21 entries total with softap0, p2p0, rmnet_data, etc)
sysctl -w net.ipv6.conf.all.hop_limit=66
sysctl -w net.ipv6.conf.default.hop_limit=66
Most android kernels don't have the ttl module and will throw an error when attempting to set the ttl or hop limit, so I'm requesting a custom one for the V30 like this one: https://forum.xda-developers.com/t/mod-magisk-stock-ttl-tethering-fix.3836216/
Is there also another way to change the IPv4 TTL permanently or on boot? Or change a specific network interface's TTL without IPTABLES? The TTL Master app in question runs a command to change the TTL on this file "/proc/sys/net/ipv4/ip_default_ttl", then toggles airplane mode to take effect. What's an easy init.rc script I could add to Magisk or AFWall+ to set the IPv4 TTL?

@patato21 I've moved the thread out of development section to Q&A as it didn't qualify for development. Please read the sticked guidances for this respect.
However, I've also closed your thread and removed the [BOUNTY] from the thread title. XDA doesn't allow bounty threads. XDA Forum Rules (excerpt):
8. Donations.
As a user, you're allowed to ask for donations in your signature as a thank you for your hard work, however donations up front are not allowed. This forum is about sharing and not about getting paid to do something... that is what your job is for.
Click to expand...
Click to collapse
Please advise the moderators team (best via the report function) to re-open your thread when you're ready and willing to edit the bounty related parts out of your OP, which otherwise indeed raises some interesting questions. I'd be very happy if your thread could be re-opened.
Regards
Oswald Boelcke
Senior Moderator

Related

Tethering and hiding

OK this might be in the wrong place if so sorry, however might be of use and maybe can be used to dev some work arounds when tethering...
Intro seemingly ATT US have started to spot people who are tethering BUT not on a data plan that "alows" tehtering (we can argue the rights and wrongs of that but this isnt about that issue)
People where asking about how they could tell, I found the following on The Register
QQQ
For all you wondering how they can tell:
All IP packets have something called a TTL associated with them. It stands for Time To Live. Every "hop" along the network from one router to the next reduces the TTL by one. When it reaches 0, the packet is dropped. This was introduced to keep routing problems from overloading the network. If for example, by some error a packet was going around in a circular path, the TTL would eventually reach 0 and prevent a packet storm.
The thing is, ALL routing devices do this. OSes use standard TTLs. For example, let's say both your iPhone and laptop use 127 for the TTL. AT&T will receive packets from your iPhone with a TTL of 127, but since the packets from your laptop pass through your iPhone first, they arrive at AT&T with a TTL of 126. They can detect a tethered device this way.
Apple uses a TTL of 64 for the iPhone, by the way. So change the TTL on your computer to "65" and there should be no problem. Here's how to do it:
1. Click Start - Search and type “regedit”. This launches the WIndows Registry.
2. In the registry, navigate to the following registry key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Services
\Tcpip
\Parameters
3. In the right pane, right-click and select New – DWORD (32-bit value) and set its name as “DefaultTTL” and set its value anything between “0? and “255?. The value sets the number of Hops or links the packet traverses before being discarded.
Kudos to Ryan Laster1. I don't have an iPhone to test this.
UQUQUQ
Ok for most that is straight forward and simple little process, however we would need to know what the TTL for the Hero (or all HTC's) is and then either alter it when using tehtering (alter the tethering APK) or write a script that when tathering alters the computers TLL too Hero+1
Ok so hope th above makes somesense and it can be used by some one
If not... carry on the good work
Note that there are more ways to detect stuff like hidden network segments, not just TTL - although TTL spoofing certainly doesn't hurt.
Although it's safer when done directly on the device *behind* the tethered phone, not on the phone itself.
Just a question about this way to hide tethering. I have a captivate that at&t does not know is a smartphone. If I tether will at&t know I have a smartphone. As there are many older phones that would tether (so to speak). As at&t does not have a non smartphone tethering plan. Can I just say I am tethering with a non smartphone?

Firewall not working on VPN connections [iptables/Droidwall] ?

Hey guys,
I really hope to get an answer on this as it is kind of really important for me here...
It seems that Droidwall stops working once I connect through a VPN and thus opening the door wide for any applications to connect to the internet; hello ads ..and what not...!!
I saw that someone has already opened an issue (almost 3 months ago) on code.google.com and it is the same issue here, except that I usually choose the Blacklist mode instead - checked means blocked.
I have to first enable "1016: VPN networking" and also "(root) App's running as root" for the VPN to connect properly; it does then, right away, I can see that Droidwall no longer blocks what I've selected. Re-applying the rules doesn't change that either.
I've never tried custom rules in that software, but I doubt that it would work since that it seems like all the apps are just bypassing Droidwall altogether when on VPN.
So any of you know a solution to this?
Preferrably using Droidwall, but other solutions are also welcomed.
I'm using CM7 (for Defy - recent nightly) and the VPN I've tried is DroidVPN (but I've read the same about at least one other VPN).
And btw, I've posted the same question on the Droidwall official thread, but no reply yet..
Thanks in advance.
Edit:
I've just tried LBE Privacy guard and I experience the same; even that plus Droidwall (both enabled while on vpn) and I can sill see ads go through...
Yo, I was going through my old posts/threads and I saw this one unanswered ....
So in case anyone else search for this in the future, here's the solution:
in Droidwall, hit menu, more, 'Set a custom script" and paste the following in the top box:
Code:
$IPTABLES -A "droidwall" -o tun+ -j "droidwall-wifi"
Hit OK and reboot.
You now have a vpn access that do not let every app go through on wifi (no solution for 3G yet... sorry).
Cheers
/AL
Edit [Jan19,2013]:
Thanks to topjor, here's the code to do the same thing on 3G:
Code:
$IPTABLES -A droidwall -o tun+ -j droidwall-3g || exit
Enjoy your new internet control powers!!

adhoc in 4.0 API or still need hacks ?

Hello.
I am a CS student. I have a project to write a communication library for android using wifi card. Library should allow transfer of objects between the phones. (in short words I need TCP or at least UDP).
What I would do on a laptop:
switch to adhoc mode, put each laptop on different static IP. use TCP/UDP for communication.
I have a problem doing the same on Android as it does not natively support adhoc.
My question:
I need my library to work on EVO 4G phone (currently on Android 2.3). I will of course need to root it. But what would you recommend after the rooting ?
Exploring teather libraries (http://code.google.com/p/android-wifi-tether/) or flashing it to 4.0 ? Will I get an API that allows me to use the card in adhoc mode or I will still need to dig that teather libs ?
The communication I need should be using wifi card when there is no AP present and android phones may get in range and out of range of each other.
I am pretty new to Android development. The language I use for the library is JAVA.
Any links/suggestions/thoughts are very welcome.
Thanks in advance.
A bit of clarification.
I don't need any routing protocol for adhoc. What I mean is if I have 3 nodes that are in range of each other I need them to be able to send packets only to each other.
I don't need the dynamic route discovery algorithms.
In case the current topology is <node a> ---- <node b> ---- <node c> (node A is not in wifi range of node C). In this case node A and C can't communicate.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Moving to Q&A

[Q] Simultaneous WiFi (no-data) & 3G (data)

Hi there everyone,
I'm wondering if on an android device there's a way to force it to keep open a wifi connection that is not used for data, for example to a Seagate Goflex Satellite (WiFi HDD) or eye-fi (WiFi SDHC) while also being simultaneously connected to 3G for data. Obviously connecting to 2 wifi connections is out of the question, but thought maybe somewhere out there is someone who 's found a way to do what I'm looking at.
Thanks.
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
lufc said:
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
Click to expand...
Click to collapse
Thanks
Bump
Bump - anyone have any idea?
Thanks.
No-one has any ideas?
Even I am hunting for the same.
Check these links
http://mobisocial.stanford.edu/news...together-by-hacking-connectivityservice-java/
https://gist.github.com/CyanogenMod...a/com/android/server/ConnectivityService.java
I am not sure if it will work though! Coz I find this reply more convincing..
Pallas Says:
April 13, 2012 at 5:58 am
are you sure the packets are going thru both interfaces?
I think it doesn’t work, simply because you would need two default gateways, leading to some hard problems:
- how does the system choose where to send the packets?
- for outgoing packets: unless the two connections have both statically assigned public IP addresses, which is very unlikely, you will end up with two differently NATed paths, and the client will refuse packets coming from two different ip addresses on the same connection.
- for incoming packets: to let the client send packets to both interfaces, you would need to send them from both interfaces with different source ip addresses: it will not work, the client will get confused. and anyway you would need support at the application level.
to solve all this, you’d need to:
- make an ad-hoc application which understands all this and can send chuncks to both interfaces, then merge all the returning chunks. you’d need support at the application level: for example you’d need http byte range support on both client and server
- divide “equally” the single specific connections thru the two gateways. this may work but it’s pretty hard if you do not have access to advanced routing and traffic shaping at the kernel level. may be possible on a phone with custom compiled aosp rom and modified kernel

Different options to avoid 3 Mobile UK tethering block.

Hi everyone,
I am trying to get my head around on what can be done to bypass the tethering filter on 3UK.
Below are different scenarios I have come up with and would like any volunteers who could try out any of the following for me. Of course I will be doing these myself as and when time permits but its always helpful to have others view on it too.
Please and I say please, do not turn this thread into Right and Wrongs of tethering or Terms and conditions of 3 mobile contracts. Please keep your views to yourself regarding if its lawful or unlawful or ethical or unethical or whatever you seem to come up with. I would like this to be a productive thread, instead of random comments on tethering.
Option 1: Use SSH Tunnel * Should I use SSH tunnel on my phone and use my PC to connect to it to use internet. Is there a reverse option?
Option 2: Use OpenVPN Install OpenVPN on your pc, and connect your phone to your pc using default VPN function on your phone in my case GT-I9100 comes with VPN function. You could also try to reverse this method and install OpenVPN on your phone and use your PC to connect to it. *
Option 3: Use the above two together in combination As the heading says, use SSH tunnel to connect to your OpenVPN.
Option 4: Use a proxy on your pc and connect to your phone or reverse, install proxy app on your phone and point your pc web browser to that proxy address. You could use the SSH tunnel here to connect too.
So, tools at hand are vpn with any encryption available, ssh tunnel, proxy server.
Tools to ignore - TOR (onion), garlic based TOR like, changing User Agent on web browsers or paid VPN.
3 UK has two APN settings, three.co.uk for mobiles (NATd ip address) and 3internet (dongle users) has external IP address and I believe it’s an Open NAT or no NAT.
Please feel free to mix and match any options and also share your views on what is technically possible.
I hope to see something useful and learn a bit more. Even if we fail to achieve the desired results, it will still be enlightening to find the facts on how 3 detects tethering.
I
Code encode decode
Found on giff gaff forum useful info
Well, they have a few ways..TTL: In my opinion, the most likely telltale signal of tethering. For example, *iOS packets originate with a TTL of 64, so if they see anything else they know something is up. This is very easy to check, as the TTL is checked by each router as the packet is handled. (the address on the envelope - doesn't require opening the letter, to use an analog analogy)APN: Another possible sign of tethering is data being routed over the access point set up for the built-in tethering feature. But giffgaff does NOT have a separate APN for Tethering. Again, this is easy to check without deep packet inspection.User-agent: This is where carriers would need to get heavy-duty equipment and a willingness to be invasive to detect tethering. Your browser sends information about itself to remote web servers, and this information could be checked. I do not think giffgaff is doing this (to detect tethering at least,) as it is not proof of tethering since anyone can easily use another browser on your phone that reports a different User Agent.Web Sites Visited: Again, highly invasive, though it doesn't require DPI. If you're using the DNS servers of the carrier, they could look for requests for certain domain names like windowsupdate.com etc. This wouldn't be proof either, though.I would bet that they are using TTL. So tunneling the TCP/IP packets that way probably resets the TTL to the default of the WAN interface on the phone.
Code encode decode
Why do you have to make 2 threads for the same subject?
Well I wasn't sure at the time of writing first one if I had to go down the route of testing which the second one is for. So, the first one is literally to know if its happening to new contracts only and second is for testing different scenarios and finding how.
Hope this helps and if not then jog on.
Code encode decode
Invincible29 said:
Hope this helps and if not then jog on.
Click to expand...
Click to collapse
Less of the attitude please and more of the reading of forum rules. Stick to one thread for the same thing.
Thread closed, use the other one (it was created first).

Categories

Resources