Giter VIP home page Giter VIP logo

ubond's Introduction

========================================= UBOND - Usermode Bonding

Build Status Coverity Status

author: Mark Burton (from original code by Laurent Coustet )

Take a look at the official documentation on Read The Docs

Introduction

UBOND will do its best to achieve the following tasks:

  • Bond your internet links to increase bandwidth (unlimited)
  • Secure your internet connection by actively monitoring your links and removing the faulty ones, without loosing your TCP connections.
  • Secure your internet connection to the aggregation server using strong cryptography.
  • Scriptable automation and monitoring.

Quick install

Install debian package

sudo apt-key adv --keyserver pgp.mit.edu --recv 3324C952
echo "deb http://debian.ubond.fr unstable/" >/etc/apt/sources.list.d/ubond.list
sudo apt-get update
sudo apt-get install ubond

Install FreeBSD port

pkg install git libev libsodium
git clone --branch freebsd https://github.com/zehome/UBOND ubond
cd ubond
make

Install "static" package

This is usefull on old systems. For example, for debian

wget https://github.com/zehome/UBOND/releases/download/2.3.1/ubond_static_ev_4.22_libsodium_1.0.10.tar.gz
tar -C / -xpzf ubond_static_ev_4.22_libsodium_1.0.10.tar.gz
adduser --quiet --system --no-create-home --home /var/run/ubond --shell /usr/sbin/nologin ubond
chmod +x /etc/init.d/ubond
insserv ubond

Build from source

# Debian
$ sudo apt-get install build-essential make autoconf libev-dev libsodium-dev libpcap-dev
# OR ArchLinux
$ sudo pacman -S base-devel git libev libsodium
$ ./autogen.sh
$ ./configure
$ make
$ make install

Build debian package

$ sudo apt-get install build-essential make autoconf
$ dpkg-buildpackage -us -uc -rfakeroot

Generating a static binary

apt-get install flex bison build-essential
UBOND_VERSION=2.3.0
EV_VERSION=4.22
LIBSODIUM_VERSION=1.0.8
PCAP_VERSION=1.7.4
wget http://dist.schmorp.de/libev/libev-${EV_VERSION}.tar.gz
wget https://github.com/jedisct1/libsodium/releases/download/1.0.8/libsodium-${LIBSODIUM_VERSION}.tar.gz
wget http://www.tcpdump.org/release/libpcap-${PCAP_VERSION}.tar.gz
tar xzf libev-${EV_VERSION}.tar.gz
tar xzf libsodium-${LIBSODIUM_VERSION}.tar.gz
tar xzf libpcap-${PCAP_VERSION}.tar.gz

echo libev
(cd libev-${EV_VERSION}
./configure --enable-static --disable-shared --prefix $HOME/libev/
make -j4 install)

echo libsodium
(cd libsodium-${LIBSODIUM_VERSION}
./configure --enable-static --disable-shared --prefix=$HOME/libsodium/
make -j4 install)

echo libpcap
(cd libpcap-${LIBPCAP_VERSION}
./configure --disable-shared --prefix $HOME/libpcap/
make -j4 install)

wget https://github.com/zehome/UBOND/releases/download/${UBOND_VERSION}/ubond-${UBOND_VERSION}.tar.gz
tar xzf ubond-${UBOND_VERSION}.tar.gz
cd ubond-${UBOND_VERSION}
libpcap_LIBS="-L${HOME}/libpcap/lib -lpcap" libpcap_CFLAGS="-I${HOME}/libpcap/include" libsodium_LIBS="-L${HOME}/libsodium/lib -lsodium" libsodium_CFLAGS=-I${HOME}/libsodium/include libev_LIBS="-L${HOME}/libev/lib -lev" libev_CFLAGS=-I${HOME}/libev/include ./configure --enable-filters LDFLAGS="-Wl,-Bdynamic" --prefix=${HOME}/ubond/
make install

Dependencies

  • libev
  • libsodium
  • libpcap (optional)

Security

Privilege separation

UBOND uses privilege separation to keep high privileges operations away from the core routing stuff.

Code running as root is very minimalist and highly readable to avoid risks as much as possible.

Read more about privilege separation

Cryptography

  • Encryption: Salsa20 stream cipher
  • Authentication: Poly1305 MAC

Read more on salsa20 and libsodium.

Principle of operations

TODO

Compatibility

Linux, OpenBSD, FreeBSD, OSX

Windows is NOT supported, but UBOND runs on routers, so you can benefit from UBOND on ANY operating system of course.

Contributors

  • Laurent Coustet, author and maintainer
  • Philippe Pepiot, contributor (privilege separation, bugfix)
  • Ghislain Lévèque, contributor (weight round robin)
  • Fabien Dupont, contributor (bugfix)
  • Thomas Soëte, contributor (bugfix)
  • Frank Denis, contributor (documentation)
  • Nicolas Braud-Santoni, contributor (documentation)
  • Stuart Henderson, contributor (OpenBSD port/package)
  • Olivier Cochard-Labbé, contributor (FreeBSD/OpenBSD fib routing)
  • Michael Stapelberg, contributor (documentation)
  • Mark Burton, contributor (Reorder buffer re-write)

LICENSE

See LICENSE file.

Documentation

Documentation is available on Read The Docs.
The manpage is also authored in Markdown, and converted using ronn.

ubond's People

Contributors

markfoodyburton avatar teowoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ubond's Issues

Install Script

I don't think your install script is correct. It has bad links, and also still links zehome's github.

Compile error, `ubond_rtun_bind` function on OpenWrt & Bandwidth Algorithm Analysis

Hiya. I've been using MLVPN on OpenWrt. I'm interested in checking your version, ubond.
MLVPN will crash with exitcode 1 (segfault?) on OpenWrt when trying to bind to an interface IP (bindhost). Which pretty much kills any use of multipath.

I made this makefile to compile ubond for OpenWrt.
Makefile.txt

I also added the musl fix patch which is enough for MLVPN to be compiled.
It fails to compile ubond. Here's the compile log:
compile+musl.log

There's this error on the log:

ubond.c: In function 'ubond_rtun_bind':
ubond.c:1150:56: error: format not a string literal and no format arguments [-Werror=format-security]
       snprintf(ifr.ifr_name, sizeof(ifr.ifr_name) - 1, t->binddev);
                                                        ^

MLVPN will compile fine without this error but will exit with exitcode 1 when trying to bind to an interface IP.

Might there be something wrong with binding to interface IPs on MLVPN and ubond which makes this feature break on OpenWrt?

I believe a patch in the right place could solve this issue for compiling and make binding work on OpenWrt.

Got time to mess around about this?

Not working, help please ?

Hello! I have compilled ubond from source, and tried to use basic mlvpn config files, but it does not even creates tun interface, and there is no packet flow from client, can you help me please - post basic config and startup options ?

how to use --permitted options ?

./ubond -c /etc/conf/ubond.conf --debug --permitted :

./ubond -c /etc/conf/ubond.conf --debug --permitted ubond0:61200

its not executed.

what is the use of this part?

............................................................................................................................................

Remote control can be setup on UNIX socket

and TCP / HTTP protocol.

remote control will output statistics only at the moment.

You can visualise statistics using the www/ templates.

RAW json stream available on http://[control_bind_host]:[control_bind_port]/status

Edit www/js/ubond.js url to point to your ubond status URL.

#control_unix_path = "@localstatedir@/run/ubond.sock"
#control_bind_host = "0.0.0.0"
#control_bind_port = "1040"
.............................................................................................................................................

what s the use of this part?
and
control_unix_path = "@localstatedir@/run/ubond.sock"
where present this path ?
please help!

write error

2020-12-29T08:03:32 [ DBG/protocol] l2r2 sending keepalive
2020-12-29T08:03:33 [ DBG/protocol] l2r1 mlvpn_rtun_challenge_send
2020-12-29T08:03:33 [ DBG/reorder] adjusting reordering drain timeout to 453ms
2020-12-29T08:03:33 [ DBG/protocol] l1r1 mlvpn_rtun_challenge_send
2020-12-29T08:03:33 [ DBG/net] > l1r2 sent 44 bytes (size=0, type=2, seq=0, reorder=1)
2020-12-29T08:03:33 [ DBG/net] > l1r1 sent 46 bytes (size=2, type=0, seq=0, reorder=1)
.........................................................................................................................................................
2020-12-29T08:03:33 [WARN/net] l2r2 write error: Operation not permitted
2020-12-29T08:03:33 [WARN/net] l2r1 write error: Operation not permitted
........................................................................................................................................................
2020-12-29T08:03:33 [ DBG/net] < l2r2 recv 44 bytes (type=2, seq=0, reorder=1)
2020-12-29T08:03:33 [ DBG/rtt] l1r2 1ms srtt 34ms loss ratio: 0 seqvect: 00000000ffffffff
2020-12-29T08:03:33 [ DBG/net] < l1r2 recv 44 bytes (type=2, seq=0, reorder=1)
2020-12-29T08:03:33 [ DBG/protocol] l1r2 keepalive received
2020-12-29T08:03:33 [ DBG/protocol] l1r2 sending keepalive
2020-12-29T08:03:34 [ DBG/protocol] l2r1 mlvpn_rtun_challenge_send

and the subtunnel l2r2 and l2r1 is not up.
how to resolve this problem ?

how to connect multiple sub tunnel in one port.

server side :
[l1r1]
bindhost = "192.168.aa.aa"
bindport = 32108

[l1r2]
bindhost = "192.168.bb.bb"
bindport = 32108

[l2r1]
bindhost = "192.168.aa.aa"
bindport = 32108

[l2r2]
bindhost = "192.168.bb.bb"
bindport = 32108

client side:
[l1r1]
bindhost = "192.168.xx.xx"
bindport = 5080
remotehost = "192.168.aa.aa"
remoteport = 32108
[l1r2]
bindhost = "192.168.xx.xx"
bindport = 5081
remotehost = "192.168.bb.bb"
remoteport = 32108
[l2r1]
bindhost = "192.168.yy.yy"
bindport = 5082
remotehost = "192.168.aa.aa"
remoteport = 32108
[l2r2]
bindhost = "192.168.yy.yy"
bindport = 5083
remotehost = "192.168.bb.bb"
remoteport = 32108

i have write this type in both side but sub tunnel is not created.
how to connect ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.