DhavalKapil / icmptunnel

Transparently tunnel your IP traffic through ICMP echo and reply packets.
https://dhavalkapil.com/icmptunnel/
3.06k stars 343 forks source link

Ignore simple ping #5

Open unixfox opened 8 years ago

unixfox commented 8 years ago

If a machine ping me during the program is launched, icmptunnel crashed with this error:

root@debian:~/icmptunnel# ./icmptunnel -s 10.0.1.1 [DEBUG] Allocatating tunnel [DEBUG] Allocatating tunnel2[DEBUG] Created tunnel tun0 [DEBUG] Starting tunnel - Dest: 10.0.1.1, Server: 1 [DEBUG] Opening ICMP socket [DEBUG] Binding ICMP socket 0+1 records in 0+1 records out 2 bytes (2 B) copied, 9.6663e-05 s, 20.7 kB/s 0+1 records in 0+1 records out 2 bytes (2 B) copied, 7.4032e-05 s, 27.0 kB/s [DEBUG] Script ran successfully [DEBUG] Received ICMP packet [DEBUG] Read ICMP packet with src: 194.90.37.75, dest: 94.23.11.59, payload_size: 129, payload: E [DEBUG] Writing to tunnel [DEBUG] Src address being copied: 194.90.37.75 [DEBUG] Received ICMP packet [DEBUG] Read ICMP packet with src: 188.235.15.178, dest: 94.23.11.59, payload_size: 129, payload: Ep [DEBUG] Writing to tunnel [DEBUG] Src address being copied: 188.235.15.178 [DEBUG] Received ICMP packet [DEBUG] Read ICMP packet with src: 92.222.185.1, dest: 94.23.11.59, payload_size: 4, payload: ^ ; [DEBUG] Writing to tunnel Unable to write to tunnel : Invalid argument

DhavalKapil commented 8 years ago

I was thinking of somehow making my ICMP packets unique. So that I could filter out my own packets.

giuscri commented 8 years ago

making my ICMP packets unique

What about starting the data wrapped in the ICMP packet with some magic bytes?

Say, b'ICMPTUN'?

DhavalKapil commented 8 years ago

Yeah that's what I will have to do in the end. I'll work further on this after a month. Need to take care of a lot of things which will require proper designing.

yunfan commented 5 years ago

@DhavalKapil please dont add unique feature, in that case it will also be identified by those firewall maker. i think just fix the wrong data problem might be okay

fkerem commented 3 years ago

I have the same issue, any updates?