Thursday, February 24, 2011

Zebedee tunnel for Asterisk




This guide is simply an example of one of many possible variations.


In this example, a UDP-Tunnel (FBF1: 4570 -> FBF2: 4569) structure, ie the tunnel takes data on FBF1: 4570 (here restricted to the localhost interface) and forwards this encrypted to FBF2: 4569 on.
Port 4569 is the default port for IAX, because we will get a Asterisk <-> Asterisk connect to and work to IAX works best.


Configuration Server (FBF2):
IP: 192.168.178.3
1) ensure that public-key from point 3 below to / etc / Zebedee / clients.id was copied
2) The following server config to /etc/zebedee/zbd-server.conf copy
Code:
#### SERVER-CONFIGURATION
#### FOR SERVER ACCEPTING TUNNEL REQUESTS
# Selects server-mode or client-mode
server true
# Only UDP traffic will be handled ( can be TCP, UDP or BOTH )
ipmode udp
# Listen on localhost, equivalent to "localsource true"
# Change if you want to allow listening on other interfaces
listenip 127.0.0.1
# port on which the server will listen for connections.You may need to open Firewal port to allow listening on 14569 from internet.
serverport 14569
# Use zlib compression with compression level 0 ( 0:no compression, 9:max compression )
compression zlib:0
# max buffer-size for data packages
maxbufsize 4100
# Only permit connections from clients-IDs listed in defined file
checkidfile /etc/zebedee/clients.id
3) Zebedee server
Code:
zebedee -f zbd-server.conf
Configuration Client (FBF1):
IP: 192.168.178.1
1) private key for client
Code: Code:
cd /etc/zebedee
zebedee -p > client_fbox.key


2) public key for the server to produce identification
Code:
zebedee -P -f client_fbox.key > client_fbox.id


3) Public Key from client_fbox.id on server (FBF2) in the file /etc/zebedee/clients.id Add
4) The following client-config to /etc/zebedee/zbd-client.conf copy
Code:
#### CLIENT-CONFIGURATION
#### FOR CLIENT INITIATED TUNNEL
# Selects server-mode or client-mode
server false
# Only UDP traffic will be handled ( can be TCP, UDP or BOTH )
ipmode udp
# Name of server host to which to connect
serverhost 192.168.178.3
# port on which the client will attempt to connect to zebedee server
serverport 14569
# Establish UDP tunnel and direct tunneled data from sourceport to targethost on targetport
# tunnel sourceport/udp:targethost:targetport
tunnel 4570/udp:192.168.178.3:4569
# Use zlib compression with compression level 0 ( 0:no compression, 9:max compression )
compression zlib:0
# max buffer-size for data packages
maxbufsize 4100
# Create private key: zebedee -p >client_fbox.key
# Create matching public key: zebedee -P -f client_fbox.key > client_fbox.id
# Public key to be stored on server in file defined by: checkidfile /etc/zebedee/clients.id
# Include config-file containing client private key
include /etc/zebedee/client_fbox.key






5) Zebedee Client
Code:
zebedee -f zbd-client.conf
If everything works, it should now FBF1 via a subscriber to FBF2 be attainable, for example, when selecting the number "680" on FBF1 the echo test with the number 80 on FBF2 called

No comments:

Post a Comment