Temat: TTL

witam
uzywam gargoyle w roznych krajach czasami z modemem czasami z telefonem i tetheringiem, rozni operatorzy gsm w roznych krajach stosuja czasami techniki uniemozliwiania tetheringu na tel komorkowym, czasami pomaga zmiana dns na routerze, kiedys chyba w tomato byla opcja zmiany TTL, czy jest taka opcja w gargoyle (chaos calmer) byc moze ograniczenie tethering polega rowniez na liczeniu ttl, aby to sprawdzic musialbym te wartosc zmodyfikowac, jak to zrobic?

2

Odp: TTL

Ręcznie: http://eko.one.pl/?p=openwrt-konfigurac … niettlttl1

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: TTL

ok
a co tu     "eth0.1  "     trzeba wpisac jak sie uzywa     dhcp wireless ?

4

Odp: TTL

"gdzie eth0.1 jest interfejsem od strony wan" więc na wlan0 zmienić.

5

Odp: TTL

To w końcu używasz telefonu i tetheringu czy wifi? Czy jesteś przez wifi podłączony do telefonu?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

6 (edytowany przez ewcorek 2017-02-10 20:01:44)

Odp: TTL

witam ponownie
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2017.02.10 19:56:24 =~=~=~=~=~=~=~=~=~=~=~=
login as: root
root@192.168.2.1's password:


BusyBox v1.23.2 (2016-04-14 07:01:54 CEST) built-in shell (ash)


             _____                             _
            |  __ \                           | |
            | |  \/ __ _ _ __ __ _  ___  _   _| | ___
            | | __ / _` | '__/ _` |/ _ \| | | | |/ _ \
            | |_\ \ (_| | | | (_| | (_) | |_| | |  __/
             \____/\__,_|_|  \__, |\___/ \__, |_|\___|
                              __/ |       __/ |
                             |___/       |___/

----------------------------------------------------------------
|                                                              |
| Gargoyle PL 1.9.1.2 (0db073a)                                |
| OpenWrt Chaos Calmer 15.05.1 (r49474)                        |
| Build time: 2016-11-11 18:41 CET                             |
|                                                              |
| Cezary Jackiewicz (obsy), http://eko.one.pl                  |
|                                                              |
----------------------------------------------------------------
| Machine: Linksys WRT1900ACS                                  |
| Uptime: 0d, 00:18:31                                         |
| Load: 0.03 0.01 0.00                                         |
| Flash: total: 20.2MB, free: 19.0MB, used: 1%                 |
| Memory: total: 503.1MB, free: 467.0MB, used: 7%              |
| WAN: 192.168.43.154, proto: dhcp                             |
| LAN: 192.168.2.1                                             |
| radio0: mode: ap, ssid: crew 5GHz, channel: 36, conn: 0      |
| radio1: mode: ap, ssid: crew, channel: 7, conn: 1            |
| radio1: mode: sta, ssid: acer liquid, channel: 7, conn: 1    |
----------------------------------------------------------------
root@Gargoyle:~# opkg install kmod-ipt-ipopt iptables-mod-ipopt
WARNING: Package kmod-ipt-ipopt is already installed, ignoring
         Use --force-reinstall to force reinstallation

WARNING: Package iptables-mod-ipopt is already installed, ignoring
         Use --force-reinstall to force reinstallation

No packages to install.

root@Gargoyle:~# echo "iptables -t mangle -I PREROUTING 1 -i eth0.1 -j TTL --ttl

-inc 1" >> /etc/firewall.user
root@Gargoyle:~# /etc/init.d/firewall restart
Warning: Unable to locate ipset utility, disabling ipset support
* Flushing IPv4 filter table
* Flushing IPv4 nat table
* Flushing IPv4 mangle table
* Flushing IPv4 raw table
* Flushing conntrack table ...
* Populating IPv4 filter table
   * Zone 'lan'
   * Zone 'wan'
   * Rule 'Allow-DHCP-Renew'
   * Rule 'Allow-Ping'
   * Rule 'Allow-IGMP'
   * Rule #7
   * Rule #8
   * Forward 'lan' -> 'wan'
* Populating IPv4 nat table
   * Zone 'lan'
   * Zone 'wan'
* Populating IPv4 mangle table
   * Zone 'lan'
   * Zone 'wan'
* Populating IPv4 raw table
   * Zone 'lan'
   * Zone 'wan'
* Set tcp_ecn to off
* Set tcp_syncookies to on
* Set tcp_window_scaling to on
* Running script '/etc/firewall.user'
* Running script '/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall'
* Running script '/etc/openvpn.firewall'
root@Gargoyle:~#


wpisywalem rowniez wlan0
i tez dostaje komende   Unable to locate ipset utility, disabling ipset support
co robie zle? jestem podlaczony przez wifi, do telefonu ktory ma wlaczony tethering po wifi
potrzebuje pokombinowac  Z TTL w siecie lyca.be

7

Odp: TTL

Nic nie robisz źle, to standardowy komunikat.
Wszystko robisz źle smile - zgodnie z instrukcją miałeś zmienić interfejs na którym chcesz podbić ttl. Dałeś eth0.1 które jest lanem. PO CO?

Gdzie masz podłączony modem? Bo na razie jesteś przez wifi podłączony, więc wszystkie operacje nie mają na razie sensu.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

8

Odp: TTL

jestem podlaczony przez telefon i tak zostanie, nie mam modemu
ewentualnie moge podlaczyc telefon pod usb
a po wifi sie nie da?

9

Odp: TTL

jeszcze raz, bo nie wiem czy sie zrozumielismy
telefon ma tethering po wifi, z tego gargoyle bierze neta, ewentualnie moge podlaczyc telefon do portu usb gargoyle i tak udostepnic, ale wolalbym zeby bylo to po wi-fi ( DHCP wireless)

10

Odp: TTL

No to interfejsem jest wlan1 lub wlan1-1, nie eth0.1

Zrob wifi status i zobacz jaki jest interfejs w sekcji klienta.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

11

Odp: TTL

A jesteś pewien że to jest problem z ttl? Zrób ping 8.8.8.8 i zobacz z jakim ttlem wraca.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

12

Odp: TTL

wifi status
{
        "radio0": {
                "up": true,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "config": {
                        "channel": "36",
                        "hwmode": "11a",
                        "path": "soc\/soc:pcie-controller\/pci0000:00\/0000:00:01.0\/0000:01:00.0",
                        "htmode": "VHT80",
                        "noscan": true,
                        "country": "PL"
                },
                "interfaces": [
                        {
                                "section": "ap_a",
                                "ifname": "wlan0",
                                "config": {
                                        "mode": "ap",
                                        "disassoc_low_ack": false,
                                        "ssid": "crew 5GHz",
                                        "encryption": "psk",
                                        "key": "zakopane",
                                        "mode": "ap",
                                        "network": [
                                                "lan"
                                        ]
                                }
                        }
                ]
        },
        "radio1": {
                "up": true,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "config": {
                        "hwmode": "11g",
                        "path": "soc\/soc:pcie-controller\/pci0000:00\/0000:00:02.0\/0000:02:00.0",
                        "htmode": "HT20",
                        "noscan": true,
                        "country": "00",
                        "channel": "7"
                },
                "interfaces": [
                        {
                                "section": "ap_g",
                                "ifname": "wlan1-1",
                                "config": {
                                        "mode": "ap",
                                        "disassoc_low_ack": false,
                                        "ssid": "crew",
                                        "encryption": "psk",
                                        "key": "zakopane",
                                        "mode": "ap",
                                        "network": [
                                                "lan"
                                        ]
                                }
                        },
                        {
                                "section": "stacfg",
                                "ifname": "wlan1",
                                "config": {
                                        "mode": "sta",
                                        "key": "zakopane1",
                                        "ssid": "acer liquid",
                                        "encryption": "psk2",
                                        "mode": "sta",
                                        "network": [
                                                "wan"
                                        ]
                                }
                        }
                ]
        }
}

13

Odp: TTL

wlan1

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

14

Odp: TTL

wlasnie dzis jestem holandii, w belgii tam gdzie to blokuja bede jutro
sprawdzilem dzis ping i ttl jest 40

15

Odp: TTL

root@Gargoyle:~# opkg install kmod-ipt-ipopt iptables-mod-ipopt
WARNING: Package kmod-ipt-ipopt is already installed, ignoring
         Use --force-reinstall to force reinstallation

WARNING: Package iptables-mod-ipopt is already installed, ignoring
         Use --force-reinstall to force reinstallation

No packages to install.

root@Gargoyle:~# echo "iptables -t mangle -I PREROUTING 1 -i wlan1 -j TTL --ttl-
inc 1" >> /etc/firewall.user
root@Gargoyle:~# /etc/init.d/firewall restart
Warning: Unable to locate ipset utility, disabling ipset support
* Flushing IPv4 filter table
* Flushing IPv4 nat table
* Flushing IPv4 mangle table
* Flushing IPv4 raw table
* Flushing conntrack table ...
* Populating IPv4 filter table
   * Zone 'lan'
   * Zone 'wan'
   * Rule 'Allow-DHCP-Renew'
   * Rule 'Allow-Ping'
   * Rule 'Allow-IGMP'
   * Rule #7
   * Rule #8
   * Forward 'lan' -> 'wan'
* Populating IPv4 nat table
   * Zone 'lan'
   * Zone 'wan'
* Populating IPv4 mangle table
   * Zone 'lan'
   * Zone 'wan'
* Populating IPv4 raw table
   * Zone 'lan'
   * Zone 'wan'
* Set tcp_ecn to off
* Set tcp_syncookies to on
* Set tcp_window_scaling to on
* Running script '/etc/firewall.user'
* Running script '/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall'
* Running script '/etc/openvpn.firewall'


zmienilem na wlan1 i ciagle to samo

16

Odp: TTL

Tzn co jest ciągle to samo? Ten komunikat zawsze będzie, zapomnij o nim. Przecież nie widzisz i nie odczujesz zmiany. W pingach TTL powinien być o 1 większy.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

17

Odp: TTL

pinguje onet mam ttl 46, nie zmienia sie

root@Gargoyle:~# opkg install kmod-ipt-ipopt iptables-mod-ipopt
WARNING: Package kmod-ipt-ipopt is already installed, ignoring
         Use --force-reinstall to force reinstallation

WARNING: Package iptables-mod-ipopt is already installed, ignoring
         Use --force-reinstall to force reinstallation

No packages to install.

root@Gargoyle:~# echo "iptables -t mangle -I PREROUTING 1 -i wlan1 -j TTL --ttl-
inc 1" >> /etc/firewall.user
root@Gargoyle:~# /etc/init.d/firewall restart
Warning: Unable to locate ipset utility, disabling ipset support
* Flushing IPv4 filter table
* Flushing IPv4 nat table
* Flushing IPv4 mangle table
* Flushing IPv4 raw table
* Flushing conntrack table ...
* Populating IPv4 filter table
   * Zone 'lan'
   * Zone 'wan'
   * Rule 'Allow-DHCP-Renew'
   * Rule 'Allow-Ping'
   * Rule 'Allow-IGMP'
   * Rule #7
   * Rule #8
   * Forward 'lan' -> 'wan'
* Populating IPv4 nat table
   * Zone 'lan'
   * Zone 'wan'
* Populating IPv4 mangle table
   * Zone 'lan'
   * Zone 'wan'
* Populating IPv4 raw table
   * Zone 'lan'
   * Zone 'wan'
* Set tcp_ecn to off
* Set tcp_syncookies to on
* Set tcp_window_scaling to on
* Running script '/etc/firewall.user'
iptables v1.4.21: unknown option "--ttl-"
Try `iptables -h' or 'iptables --help' for more information.
/bin/sh: /etc/firewall.user: line 21: inc: not found
* Running script '/usr/lib/gargoyle_firewall_util/gargoyle_additions.firewall'
* Running script '/etc/openvpn.firewall'

18

Odp: TTL

iptables v1.4.21: unknown option "--ttl-"
Try `iptables -h' or 'iptables --help' for more information.
/bin/sh: /etc/firewall.user: line 21: inc: not found

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

19

Odp: TTL

ciagle nie wiem o co chodzi, czy mam wpisac to co ponizej, niestety nie widze tam TTL




oot@Gargoyle:~# iptables -h
iptables v1.4.21

Usage: iptables -[ACD] chain rule-specification [options]
       iptables -I chain [rulenum] rule-specification [options]
       iptables -R chain rulenum rule-specification [options]
       iptables -D chain rulenum [options]
       iptables -[LS] [chain [rulenum]] [options]
       iptables -[FZ] [chain] [options]
       iptables -[NX] chain
       iptables -E old-chain-name new-chain-name
       iptables -P chain target [options]
       iptables -h (print this help information)

Commands:
Either long or short options are allowed.
  --append  -A chain            Append to chain
  --check   -C chain            Check for the existence of a rule
  --delete  -D chain            Delete matching rule from chain
  --delete  -D chain rulenum
                                Delete rule rulenum (1 = first) from chain
  --insert  -I chain [rulenum]
                                Insert in chain as rulenum (default 1=first)
  --replace -R chain rulenum
                                Replace rule rulenum (1 = first) in chain
  --list    -L [chain [rulenum]]
                                List the rules in a chain or all chains
  --list-rules -S [chain [rulenum]]
                                Print the rules in a chain or all chains
  --flush   -F [chain]          Delete all rules in  chain or all chains
  --zero    -Z [chain [rulenum]]
                                Zero counters in chain or all chains
  --new     -N chain            Create a new user-defined chain
  --delete-chain
            -X [chain]          Delete a user-defined chain
  --policy  -P chain target
                                Change policy on chain to target
  --rename-chain
            -E old-chain new-chain
                                Change chain name, (moving any references)
Options:
    --ipv4      -4              Nothing (line is ignored by ip6tables-restore)
    --ipv6      -6              Error (line is ignored by iptables-restore)
[!] --protocol  -p proto        protocol: by number or name, eg. `tcp'
[!] --source    -s address[/mask][...]
                                source specification
[!] --destination -d address[/mask][...]
                                destination specification
[!] --in-interface -i input name[+]
                                network interface name ([+] for wildcard)
--jump -j target
                                target for rule (may load target extension)
  --goto      -g chain
                              jump to chain with no return
  --match       -m match
                                extended match (may load extension)
  --numeric     -n              numeric output of addresses and ports
[!] --out-interface -o output name[+]
                                network interface name ([+] for wildcard)
  --table       -t table        table to manipulate (default: `filter')
  --verbose     -v              verbose mode
  --wait        -w              wait for the xtables lock
  --line-numbers                print line numbers when listing
  --exact       -x              expand numbers (display exact values)
[!] --fragment  -f              match second or further fragments only
  --modprobe=<command>          try to insert modules using this command
  --set-counters PKTS BYTES     set the counter during insert/append
[!] --version   -V              print package version.

20

Odp: TTL

pokaż wynik

iptables -j TTL --help

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

21

Odp: TTL

Usage: iptables -[ACD] chain rule-specification [options]
       iptables -I chain [rulenum] rule-specification [options]
       iptables -R chain rulenum rule-specification [options]
       iptables -D chain rulenum [options]
       iptables -[LS] [chain [rulenum]] [options]
       iptables -[FZ] [chain] [options]
       iptables -[NX] chain
       iptables -E old-chain-name new-chain-name
       iptables -P chain target [options]
       iptables -h (print this help information)

Commands:
Either long or short options are allowed.
  --append  -A chain            Append to chain
  --check   -C chain            Check for the existence of a rule
  --delete  -D chain            Delete matching rule from chain
  --delete  -D chain rulenum
                                Delete rule rulenum (1 = first) from chain
  --insert  -I chain [rulenum]
                                Insert in chain as rulenum (default 1=first)
  --replace -R chain rulenum
                                Replace rule rulenum (1 = first) in chain
  --list    -L [chain [rulenum]]
                                List the rules in a chain or all chains
  --list-rules -S [chain [rulenum]]
                                Print the rules in a chain or all chains
  --flush   -F [chain]          Delete all rules in  chain or all chains
  --zero    -Z [chain [rulenum]]
                                Zero counters in chain or all chains
  --new     -N chain            Create a new user-defined chain
  --delete-chain
            -X [chain]          Delete a user-defined chain
  --policy  -P chain target
                                Change policy on chain to target
  --rename-chain
            -E old-chain new-chain
                                Change chain name, (moving any references)
Options:
    --ipv4      -4              Nothing (line is ignored by ip6tables-restore)
    --ipv6      -6              Error (line is ignored by iptables-restore)
[!] --protocol  -p proto        protocol: by number or name, eg. `tcp'
[!] --source    -s address[/mask][...]
                                source specification
[!] --destination -d address[/mask][...]
                                destination specification
[!] --in-interface -i input name[+]
                                network interface name ([+] for wildcard)
--jump -j target
                                target for rule (may load target extension)
  --goto      -g chain
                              jump to chain with no return
  --match       -m match
                                extended match (may load extension)
  --numeric     -n              numeric output of addresses and ports
[!] --out-interface -o output name[+]
                                network interface name ([+] for wildcard)
  --table       -t table        table to manipulate (default: `filter')
  --verbose     -v              verbose mode
  --wait        -w              wait for the xtables lock
  --line-numbers                print line numbers when listing
  --exact       -x              expand numbers (display exact values)
[!] --fragment  -f              match second or further fragments only
  --modprobe=<command>          try to insert modules using this command
  --set-counters PKTS BYTES     set the counter during insert/append
[!] --version   -V              print package version.

TTL target options
  --ttl-set value               Set TTL to <value 0-255>
  --ttl-dec value               Decrement TTL by <value 1-255>
  --ttl-inc value               Increment TTL by <value 1-255>

22

Odp: TTL

Pokaż

cat /etc/firewall.user

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

23

Odp: TTL

root@Gargoyle:~# cat /etc/firewall.user
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.

# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
iptables -t mangle -I PREROUTING 1 -i eth0.1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i eth0.1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i eth0.1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i eth0.1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i eth1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i eth0.1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i eth0.2 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i wlan0 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i wlan0 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i eth0.1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i wlan1.1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i wlan1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i wlan1 -j TTL --ttl-
inc 1
iptables -t mangle -I PREROUTING 1 -i wlan1 -j TTL --ttl-inc 1
iptables -t mangle -I PREROUTING 1 -i wlan1 -j TTL --ttl-inc 1

24

Odp: TTL

Ale sieczkę zrobiłeś wpisujesz to 15 tysięcy razy. Skasuj wszystko zostawiając ostatnią linię.  I nie dodawaj tego już więcej.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

25

Odp: TTL

tak wlasnie zauwazylem, no ale nie znam sie na tym
jak to skasowac?