IL Ka <kazakevichi...@gmail.com> wrote:
> [-- text/plain, encoding base64, charset: UTF-8, 19 lines --]

> >
> >
> > Я тебе один страшный секрет открою - весь магический KeepAlive кривотика -
> > это пакет с 0-byte payload. Которые успешно режут некоторые виды
> > корпоративных фаирволов.

> Всё гораздо хуже:
> "
> A GRE Keepalive is a "host to router" GRE packet encapsulated inside a
> "router to host" GRE packet. The idea being the host (in this case Linux)
> receives the packet, sees the packet is actually a GRE packet for the
> router, and sends it back out. The router receives this packet and knows
> the remote end is still responding.

> The Linux FIB code is such that if it receives traffic where the source is
> a local unicast address, the traffic is considered invalid.
> "
> Так что режет его сам линукс, когда видит пакет со своим адресом в качестве
> source.
Ты эти газеты не читай больше, для здоровья вредно ибо бред написан.
Микротик шлёт именно GRE пакет с 0-byte payload:

21:56:08.164777 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), 
length 42: (tos 0x0, ttl 255, id 4127, offset 0, flags [none], proto GRE (47), 
length 28)
    192.0.2.1 > 192.0.2.254: GREv1, Flags [key present], payload szie 0, tunnel 
id 10
        0x0000:  4500 001c 101f 0000 ff2f 2694 c000 0201  E......../&.....
        0x0010:  c000 02fe 2001 6400 0000 0a00            ......d.....
21:56:08.604068 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), 
length 42: (tos 0x0, ttl 255, id 41493, offset 0, flags [none], proto GRE (47), 
length 28)
    192.0.2.254 > 192.0.2.1: GREv1, Flags [key present], payload szie 0, tunnel 
id 10
        0x0000:  4500 001c a215 0000 ff2f 949d c000 02fe  E......../......
        0x0010:  c000 0201 2001 6400 0000 0a00            ......d.....

вот тебе туда-сюда GRE keepalive пакет.

Вот тебе колхоз вокруг ipip туннеля - тут да, у них фантазии нету:

21:59:04.605691 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), 
length 54: (tos 0x0, ttl 255, id 1, offset 0, flags [none], proto IPIP (4), 
length 40)
    192.0.2.254 > 192.0.2.1: (tos 0x0, ttl 255, id 0, offset 0, flags [none], 
proto IPIP (4), length 20)
    192.0.2.1 > 192.0.2.254:  [|ip]
        0x0000:  0000 0000 0000 0000 0000 0000 0800 4500  ..............E.
        0x0010:  0028 0001 0000 ff04 36d1 c000 02fe c000  .(......6.......
        0x0020:  0201 4500 0014 0000 0000 ff04 36e6 c000  ..E.........6...
        0x0030:  0201 c000 02fe                           ......
21:59:04.621125 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), 
length 82: (tos 0xc0, ttl 64, id 7450, offset 0, flags [none], proto ICMP (1), 
length 68)
    192.0.2.1 > 192.0.2.254: ICMP 192.0.2.1 protocol 4 port 20 unreachable, 
length 48
        (tos 0x0, ttl 255, id 1, offset 0, flags [none], proto IPIP (4), length 
40)
    192.0.2.254 > 192.0.2.1: (tos 0x0, ttl 255, id 0, offset 0, flags [none], 
proto IPIP (4), length 20)
    192.0.2.1 > 192.0.2.254:  [|ip]
        0x0000:  0000 0000 0000 0000 0000 0000 0800 45c0  ..............E.
        0x0010:  0044 1d1a 0000 4001 d7df c000 0201 c000  .D....@.........
        0x0020:  02fe 0303 fcfc 0000 0000 4500 0028 0001  ..........E..(..
        0x0030:  0000 ff04 36d1 c000 02fe c000 0201 4500  ....6.........E.
        0x0040:  0014 0000 0000 ff04 36e6 c000 0201 c000  ........6.......
        0x0050:  02fe                                     ..

> Можно включить "accept_local", но это дыра, и потому используют пинг.
А можно подумать головой, понять, что микротик тупее пробки от шампанского и
через raw socket слать ему нужный вид егоного "keepalive" раз в ндцать
секунд, оно будет довольно.

Ответить