loader image

Bypass USB tether limitations from carrier [Linux]

What makes us different from other similar websites? Forums Tech Bypass USB tether limitations from carrier [Linux]

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #8040
    thumbtak
    Keymaster

    Remember to test your speed, before and after with:
    https://www.speedtest.net/

    The below command should show an empty table:
    $ sudo iptables -t mangle -L POSTROUTING -v

    Find the USB device using the command, and look for something like the example:
    $ ip a

    Example:

    8: enx2a043522888b: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 2b:44:46:73:55:4b brd ff:ff:ff:ff:ff:ff

    $ sudo iptables -t mangle -A POSTROUTING -o enx2a043522888b -j TTL --ttl-set 65

    Below should show the changes you made with the command above:
    $ sudo iptables -t mangle -L POSTROUTING --line-numbers -v

    To undo the changes you would type the number from the list, in the num section, at the end of the command, in the example:
    $ sudo iptables -t mangle -D POSTROUTING 1

    How does this work?

    Goal: To potentially increase your internet speed when using your phone as a mobile hotspot (tethering) on your Linux computer, by trying to circumvent any speed restrictions your mobile carrier might impose on tethered connections.

    Commands and Their Actions:

    1. $ sudo iptables -t mangle -L POSTROUTING -v:

    • Purpose: This command lists the current rules in the POSTROUTING chain of the mangle table in your Linux firewall (iptables).
    • Expected Outcome (Initially): The prompt states this should show an empty table. This is because you haven’t added any custom rules to the mangle table yet.

    2. $ ip a:

    • Purpose: This command displays information about all network interfaces on your Linux system, including their status, IP addresses, and MAC addresses.
    • Your Task: You need to identify the network interface that is being used for the USB tethered connection to your phone. It will likely have a name starting with enx followed by a string of hexadecimal characters (like the example enx2a043522888b). The in the interface description indicates it’s active.

    3. $ sudo iptables -t mangle -A POSTROUTING -o enx2a043522888b -j TTL --ttl-set 65:

    • Purpose: This is the core command to attempt the tethering bypass.
    • Breakdown:
      • sudo iptables: Executes the firewall command with administrator privileges.
      • -t mangle: Specifies the mangle table, used for modifying packet headers.
      • -A POSTROUTING: Appends a new rule to the POSTROUTING chain, which is processed just before packets leave your computer.
      • -o enx2a043522888b: Specifies that this rule applies only to traffic going out through your identified USB tethered network interface. You would replace enx2a043522888b with the actual name of your USB interface.
      • -j TTL: Specifies the target of the rule as the TTL (Time To Live) module, which allows modification of the TTL field in IP packets.
      • --ttl-set 65: Sets the TTL value of outgoing packets on that interface to 65.
    • Overall Action: This command attempts to change a small piece of information in the internet traffic coming from your computer (when tethered) to potentially make it less recognizable as tethered traffic to your mobile carrier. The hope is that by doing this, the carrier might not apply speed restrictions that are typically in place for tethering.

    4. $ sudo iptables -t mangle -L POSTROUTING --line-numbers -v:

    • Purpose: This command lists the rules in the POSTROUTING chain of the mangle table, but this time it also shows the line number of each rule (--line-numbers). The -v provides verbose output with more details.
    • Expected Outcome: You should see the rule you added in the previous step listed here, along with its line number (usually 1 if it’s the first rule you’ve added to this chain).

    5.  $ sudo iptables -t mangle -D POSTROUTING 1:

    • Purpose: This command is used to delete a specific rule from the POSTROUTING chain in the mangle table.
    • Breakdown:
      • sudo iptables: Executes the firewall command with administrator privileges.
      • -t mangle: Specifies the mangle table.
      • -D POSTROUTING: Specifies that you want to delete a rule from the POSTROUTING chain.
      • 1: You would replace 1 with the actual line number of the TTL modification rule that you found in the output of the previous command. This removes the rule that was attempting to bypass the tethering speed limit.

    In essence, these commands guide you through:

    1. Verifying the initial state of the firewall’s packet modification rules.
    2. Identifying the correct network interface used for your phone’s USB tethering.
    3. Adding a rule to modify the “Time To Live” value in the outgoing internet traffic on that interface, with the aim of potentially bypassing tethering speed restrictions.
    4. Confirming that the rule has been added.Providing the command to remove the rule and revert to the default behavior.

    Remember that the effectiveness of this technique in bypassing tethering speed limits can vary greatly depending on your mobile carrier and their methods of detecting tethered traffic.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
TAKs Shack