cyborg-one / nfqttl

Magisk module change ttl.
GNU General Public License v3.0
100 stars 7 forks source link

TTL of 65 on phone usage #17

Open shootind5nukes opened 10 months ago

shootind5nukes commented 10 months ago

I ran a packet sniffer from my router. Without your module installed my phone data usage, not hotspot, has a ttl of 64. With your module installed my phone usage has a TTL of 65. With your module installed all hotspot usage has a TTL of 64.

So it seems your module is setting a TTL of 65 for even my phone usage.

These readings were taken from my router. One packet you will see my phone usage, and the other hotspot usage. My phone usage is definitely showing 65.

hotspot64 hotspot65

shootind5nukes commented 10 months ago

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope: Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:17077 errors:0 dropped:0 overruns:0 frame:0 TX packets:17077 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3688772 TX bytes:3688772

dummy0 Link encap:Ethernet HWaddr 6a:40:e2:33:93:34 inet6 addr: fe80::6840:e2ff:fe33:9334/64 Scope: Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:123 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 TX bytes:19654

ifb0 Link encap:Ethernet HWaddr 46:af:64:f4:3d:3c inet6 addr: fe80::44af:64ff:fef4:3d3c/64 Scope: Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:122 errors:0 dropped:122 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:32 RX bytes:19564 TX bytes:0

ifb1 Link encap:Ethernet HWaddr 3e:6d:58:1f:0a:c4 inet6 addr: fe80::3c6d:58ff:fe1f:ac4/64 Scope: Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:120 errors:0 dropped:120 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:32 RX bytes:19407 TX bytes:0

rmnet_ipa0 Link encap:UNSPEC UP RUNNING MTU:9216 Metric:1 RX packets:1895 errors:0 dropped:0 overruns:0 frame:0 TX packets:2789 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:543712 TX bytes:662056

ifb2 Link encap:Ethernet HWaddr 3a:f0:aa:0d:15:a3 inet6 addr: fe80::38f0:aaff:fe0d:15a3/64 Scope: Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:121 errors:0 dropped:121 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:32 RX bytes:19494 TX bytes:0

rmnet_data0 Link encap:UNSPEC inet6 addr: fe80::2895:96ff:fe5f:2e91/64 Scope: Link UP RUNNING MTU:1500 Metric:1 RX packets:44 errors:0 dropped:0 overruns:0 frame:0 TX packets:30 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7149 TX bytes:2134

rmnet_data1 Link encap:UNSPEC inet6 addr: fe80::8cc5:e2ff:fe7e:f25f/64 Scope: Link inet6 addr: 2600:1006:100a:9e1c:8cc5:e2ff:fe7e:f25f/64 Scope: Global UP RUNNING MTU:1428 Metric:1 RX packets:5 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:432 TX bytes:1132

rmnet_data2 Link encap:UNSPEC inet6 addr: fe80::3c94:9fff:fe3b:fae9/64 Scope: Link inet6 addr: 2607:fc20:719e:cd4d:3c94:9fff:fe3b:fae9/64 Scope: Global UP RUNNING MTU:1440 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:864 TX bytes:1132

rmnet_data4 Link encap:UNSPEC inet addr:100.116.175.132 Mask:255.255.255.248 inet6 addr: 2600:1006:b063:e36f:d008:f2ff:fe79:5799/64 Scope: Global inet6 addr: fe80::d008:f2ff:fe79:5799/64 Scope: Link UP RUNNING MTU:1428 Metric:1 RX packets:2717 errors:0 dropped:0 overruns:0 frame:0 TX packets:3923 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1783189 TX bytes:610665

wlan0 Link encap:Ethernet HWaddr 6a:2e:2a:f1:2c:f6 Driver cnss_pci UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:180714 errors:0 dropped:0 overruns:0 frame:0 TX packets:123671 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3000 RX bytes:199668770 TX bytes:114057063

shootind5nukes commented 10 months ago

It might be working fine, and setting a ttl of 65 for the wifi. It may be sending 64 from rmnet_data4. I have no way to check this. I'll check my data usage later.

cyborg-one commented 10 months ago

The module determines the subnet mask. If a packet is sent through a loopback, the TTL does not change. If the packet is transmitted to the local network and has ttl=64, then ttl changes to 65. If the packet is transmitted to the global network and ttl=63 or 127, ttl changes to 64. Also, if the packet is transmitted from the global network and ttl = 1, ttl changes to 64. This is done so that the Module can be used both on access point devices and on devices receiving the Internet.

shootind5nukes commented 10 months ago

You sir, are a genius. I work with iptables alot, my job is in networking with Linux and routers. I would love to pick your brain one day when you arent busy to wrap my mind around how your module works. Thanks again. Have a happy new year.

On Sun, Dec 31, 2023, 11:00 AM cyborg-one @.***> wrote:

The module determines the subnet mask. If a packet is sent through a loopback, the TTL does not change. If the packet is transmitted to the local network and has ttl=64, then ttl changes to 65. If the packet is transmitted to the global network and ttl=63 or 127, ttl changes to 64. Also, if the packet is transmitted from the global network and ttl = 1, ttl changes to 64. This is done so that the Module can be used both on access point devices and on devices receiving the Internet.

— Reply to this email directly, view it on GitHub https://github.com/cyborg-one/nfqttl/issues/17#issuecomment-1872982453, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZQYNUDU7IW4RBQH4X5QFDYMGD3TAVCNFSM6AAAAABBIKC24CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSHE4DENBVGM . You are receiving this because you authored the thread.Message ID: @.***>