Post date: Jul 4, 2011 3:14:52 PM
How to use hostmapping
Host mapping allows you to map a public internet address (or lan address) from your gateway point to a remote wireless or wired device connected to a remote meshbox anywhere on the mesh.
Setting up host mapping is intended as something done as an installation, that is to say that the configuration doesn't change that frequently. Hostmapping is intended for advanced users.
What you need to know:
Remote server's lan side IP address. It is recommended to set it to a static ip in the top end of the range 192.168.X.220-240 in the range of the dhcp that the meshbox it is connected to is giving out.
The first cell ID of the node it is connected to
The public / lan address you want to map.
Check list:
Hostmapping is only supported in tobuild25dev42 onwards.
Remote node gateway type is IP and not PPP
Cell IP does not conflict with any others (wiana will warn you) Local wired side of the remote meshbox does not conflict with elsewhere on the mesh. It can be changed to a specific range, changing the "X" quoted above.
Ranges should be 1-120 for that part of the subnet. - this only applies if the remote device is connected via the remote meshbox ethernet or if an AP is connected to that ethernet that the remote device is then connected to wirelessly.
NB: You can technically have overlapping wired cells but this could cause confusion later. You can also overlap them with the lan range of the network that the gateway is attached, but this makes the remapped ip's unreachable from the gateway as it thinks they are remote ip's on the mesh. In short - not recommended but possible in large networks if you get short of cell ranges.
Check that the ip you are redirecting is in the same subnet as the gateway, it is possible to map addresses not in that range, but this requires a special netmask setting not covered here.
So for example. Our remote server is 192.168.5.220 set to a static ip on a direct wired ethernet on a remote meshbox. The first cell id of that meshbox is 210. The remote internet address we're mapping to it is 12.34.56.78
Enable port mappings and host mappings (if displayed) in the wiana management page.
In the hostmapping specification, enter a line which reads as follows.
12.34.56.78 210 192.168.5.220
With a space between each entry. These are:
Public IP - Cell ID - Remote address.
Update the node and it should then start remapping. You must make sure the remote device is authenticated or traffic cannot flow - use of an automac is recommended for this and of course the automac can represent a user and a traffic class, so you can traffic shape remote servers if required.
Important note:
If you screw up the public address you could end up with a meshbox which loses all its's ethernet or wireless capability - hard to reset etc If you screw up the remote ip you could knock out parts of the mesh or take out the gateway's internet connection If you screw up the cell number then you'll route your data to the wrong place or not at all. Be careful with the settings as invalid ones are not handled very well at the moment.
Protocol support:
Not all protocols are supported yet, web email etc and any tcp/udp based service should run aok. I'm not sure what will happen if the remote mapped box is also a nat gateway itself!!
For windows file sharing, its possible to enter the IP address url, into windows and it will connect directly to the fileshare. This should work outbound from any mesh client already, even without host mapping.
With a hostmapped host you can access it's fileshare simply by typing its ip into the address bar of windows explorer preceeded by \
eg: \12.34.56.78
Note that hostmap is a 1:1 IP mapping between the hosts, so hostmapping opens up security implications for the remotely attached device.
The hostmap also only runs when the remote node has internet gateway connectivity, if this link breaks the connectivity to the hostmapped device will also be broken until the link is re-established.
Testing needed on PPTP and IPSEC tunneling as well.