Raw sockets is the preferred mechanism for sending ICMP packets, and is used by both the proxy and the client. Many operating systems enable us to do this using so-called raw sockets. So, in order to accomplish this, we need the ability to send and receive ping packets. The client is the computer we're trying to surf the net from, and the destination is the computer we would normally be trying to access over TCP (such as a web site or an ssh server somewhere). the computer that we send the ping packets to. The proxy is the "endpoint" for our ping packets, i.e. In the following, we will talk about the proxy, the client and the destination. Ptunnel works by tunneling TCP connections over ICMP packets. It might help to read it either way, as it provides some insights into the situations where ptunnel doesn't work. If you're not interested in low-level networking details, you can skip this section. This is a technical description of how ptunnel works. See the usage section below for info on running it. configure, make, make install, just make. A posix-compliant OS, with libpcap (for packet capturing)Ĭompiling the sources simply consists of running make.Root access, preferably on both computers.A computer to act as the client (this will usually be your laptop, on the go.).One computer accessible on the internet that is not firewalled (or at least allows incoming ICMP packets).So what do you need for all this to work? Authentication, to prevent just anyone from using your proxy.Acceptable bandwidth (150 kb/s downstream and about 50 kb/s upstream are the currently measured maximas for one tunnel, but with tweaking this can be improved further).Connections are reliable (lost packets are resent as necessary).Tunnel TCP using ICMP echo request and reply packets.Ptunnel is not a feature-rich tool by any means, but it does what it advertises. With ptunnel, you can utilize this feature to check your mail, or do other things that require TCP. What to do? By chance, you discover that the network will allow you to ping any computer on the rest of the internet. The network gives you an IP address, but won't let you send TCP or UDP packets out to the rest of the internet, for instance to check your mail. Setting: You're on the go, and stumble across an open wireless network. The following example illustrates the main motivation in creating ptunnel: At first glance, this might seem like a rather useless thing to do, but it can actually come in handy in some cases. Ptunnel is an application that allows you to reliably tunnel TCP connections to a remote host using ICMP echo request and reply packets, commonly known as ping requests and replies. Handing the received transmission from the bottom to the top with each layer removing their header (or trailer).Ping Tunnel - Send TCP traffic over ICMP Ping Tunnel For those times when everything else is blocked. This process is also called encapsulation.Īt the bottom layer the data is transmitted to the receiving host, which then does the same process in reverse. At each level, the current layer adds its own header (or trailer) and hands it further downwards. When data is transmitted from one host to another, the data is handed downwards from the uppermost layer to the bottom layer of the sending host.
#TCP IP PACKET SENDER SERIES#
The number of vertical layers range from anywhere between three ( Arpanet Reference Model) and seven ( OSI model).įor this series we are going to use the five layered model from Andrew Tanenbaum: 5 There exists a vast amount of networking models and depending on where you came into contact with them first, you might know one or more of them with different numbers of vertical layers. Networking modelsįor the communication between two hosts in the internet, a layered networking model is used. In case you are very familiar with the TCP/IP network layer, protocols and three-way handshake you can skip this first part and dive directly into the analysis of raw TCP/IP packets. The knowledge we gain here will later be used to manually create network packets and send them to other hosts on our network. In this chapter we are going to have a look at the foundational basics of communication protocols used in networks like the internet.