IP over IP Tunnel running on Windows

IP Tunnelling

This will route IP packets from one place to another over a single IP connection made using UDP or TCP. Though this software runs on a Windows machines, any machine using any OS can use the link once it is made.
A typical application would be a company with two offices, each running a copy of this app to form a bridge between them.
To use this app you'll need two copies, one on a machine in each office. You will also need to install WinPCAP on both PCs. It must be possible to route either TCP or UDP between the machines running this app. Usually this can be done by forwarding a single TCP port on just one of the routers.
This app pretends to be an entirely seperate machine on the LAN. The IP and MAC address of this virtual machine are configurable. Machines in the offices use these virtual machines as the router to the other office, all traffic is then sent over a single TCP connection. For security, the TCP connection could be made using SSH, Google for OpenSSH and Putty to see how this can be done.

Settings

The UI looks like this.


Controls

I'll just run trough the controls first giving examples of how it would be configured for the 2 office scenerio above.

This End Lan Card: Choose the Ethernet card that is connected to the 192.168.1.xxx subnet. If only one card is fitted then it must be the right one.

Router Virtual IP: This should be set to the IP address you want to use for the gateway. For Office 1 it would be something like 192.168.1.66 this will be the address of the router given to the machines later.

Respond To ARP: Leave this on unless you have two copies of this app using the same Virtual MAC on the same PC.

Router Virtual Mac: 00:d0:be:d0:be:d0 usually works. If you have two of these apps on the same network, you'll need to change one of them.

Subnet This End: For office 1 this would be 192.168.1.0. It should be the subnet that the Router Virtual IP is on.

Netmask This End: This should be the normal netmask used when setting up hosts on your network. Usually 255.255.255.0.

Subnet Other End: This tells the app what traffic should be sent over the link. For the above example it would 192.168.2.0.

Netmask Other End: Similar to the Netmask This End value but applies to traffic coming out of the other end of the tunnel. Again 255.255.255.0 usually works.

Tunnel Other End: you need to set this to the IP address that will get traffic to the machine at the other end. Usually this will be the external IP of their router. This control is disabled if acting as the receiver in a TCP connection.

Port: This is the port number used to send UDP data to or to connect a TCP stream to.

Tunnel Listen Port: This is the port to listen for UDP data or TCP connections on.

TCP: When checked the app uses TCP to communicate between the two ends of the tunnel. This is the best mode to use.

Initiate connection: This should be checked on One end of the tunnel, it decided who created the TCP connection between the two apps. Once connected data is sent both ways along the same connection.

Start: Pressing this makes the tunnel connect and start to work.

Stop: This disconnects and stops any routing taking place.

Auto Start: With this checked the app will connect and start working as soon as it is launched. This is useful if you want to use it in the windows startup.

Other Setup

Of course a tunnel needs two ends, so you'll need to install and configure this app on both ends.

Any machine in Office 1 needs to know how to route trafic to Office 2, likewise machines need to know how to send traffic back. There are two ways to do this, tell the machines or tell the router.

To set a windows machine in office 1 to use this tunnel to access office 2 (assuming the Router Virtual IP was set to 192.168.1.66) open a command prompt and type the following:
route -p add 192.168.2.0 mask 255.255.255.0 192.168.1.66.
To tell the router you need to add a static route, all routers are different so I can't really say how to do this on yours. The best thing about this method is that you don't need to go round and individually set up each machine.

Download IPTunnel.exe Download WinPcap from here.



Other Stuff.

Very Simple Windows Web Server.

The Infrared Webcam Page

The temperature in Nottingham

My Chess Race animation on YouTube (Opens in a new window)

I'll probably regret this but...
Here's my e-mail address for any comments & questions.