Broadband-Hamnet™ Forum :: General
Welcome Guest   [Register]  [Login]
 Subject :Tunneling HSM-PI 0.4.0 to BHHN 3.0.1.. 2015-03-18- 12:53:45 
zl1cqo
Member
Joined: 2014-12-18- 17:02:15
Posts: 29
Location: New Zealand
 

As there seems to be some interest in this, here is what I did to get tunneling working from hsmm-pi 0.4.0 client to a BBHN 3.0.1 server.This did connected and I could see remote nodes and services listed but it did cause some problems that I haven't worked out yet.

BE WARNED! THIS DID CAUSE SOME PROBLEMS WITH OLSRD SENDING TRUNCATED DATA. DOING THIS MAKE BREAK THE MESH YOU ARE CONNECTING TO SO ONLY USE ON A TEST/DEV NETWORK

Preparation

When connecting to a BBHN tunnel server you are provided with a network IP.  This IP address is used to obtain the client and server IPs.

If your network IP is 172.31.15.152 it breaks down to:

Network = 172.31.15.152
Client = 172.31.15.153
Server = 172.31.15.154
Broadcast = 172.31.15.155

You will also need your password for the server and the external IP or server address to connect to.

All of the info below assumes you already have a working hsmm-pi node that is connected to an internet connection as a gateway/wan link

Install and configure vtun

Install vtun

sudo apt-get install vtun

Edit /etc/vtund.conf

Here is an example

options {
port 5525;
timeout 60;
syslog daemon;|
}

#Tunnel to server
AB1CDE-172-31-15-152 {
#Use your own callsign and network IP to create the tunnel name
passwd MyPaSsWoRd;
#Use the password provided by the tunnel server admin
type tun;
proto tcp;
compress lzo:9;
encrypt yes;
keepalive yes;
up {
#Replace the IP below with your own IPs.
ifconfig "%% 172.31.15.153 netmask 255.255.255.252 pointopoint 172.31.15.154 mtu 1450";
route "add -net 172.31.15.152/30 gw 172.31.15.154";
};
down {
# Connection is down
};
}

In this example you will need to use your own callsign and network IP based on the info above

Modify the OLSRD config

In the file /etc/olsrd.conf

Find the following line:

Interface “wlan0”

Replace this with:

Interface “tun0” “wlan0”

Find the following line (it occurs twice):

Ip4Broadcast   0.0.0.0

Replace it with:

Ip4Broadcast   255.255.255.255

I left the Mode setting as "Mesh"

Connect to the tunnel server

To connect to the tunnel server run the vtund command

sudo vtund AB1CDE-172.31.15.152 tunserver.callsign.com

In this example you need to change the command to use the tunnel description from vtund.conf and the server IP or address provided by the tunnel server admin

Once the command has been run you should see a new interface called vtun0 if you run the command ifconfig

This will not automatically run at boot so the command will need adding to a startup script.

Troubleshooting

If it doesn’t work, try rebooting the Pi.  You will need to run the vtund command again to reconnect the tunnel.

You can check if OLSRD is sending data over the tunnel by running the command:

sudo tcpdump –i vtun0

You should see broadcast traffic from the 2 IPs for client and server.  If you only see the server IP then it indicates that OLSRD isn’t running correctly locally.  Check the config file and reboot the Pi

IP Logged
 Subject :Re:Tunneling HSM-PI 0.4.0 to BHHN 3.0.1.. 2015-03-19- 13:22:59 
zl1cqo
Member
Joined: 2014-12-18- 17:02:15
Posts: 29
Location: New Zealand
 

I made a modification to this today to see if it would be more stable.

In olsrd.conf instead of modify the existing interface settings, I added a section:

#Mesh tunnel specific settings
Interface "tun0"
{
Mode "ether"
Ip4Broadcast   255.255.255.255

I now have a pi setup as both a client and a sever.  Currently I have a Nanostation M2 connected as a client and I will monitor the connection and olsr routing info to see if there are any issues.



IP Logged
Page # 


Powered by ccBoard


SPONSORED AD: