labonte-lucpaul / ifbind Goto Github PK
View Code? Open in Web Editor NEWBind two network interfaces to simulate a loop back.
License: GNU Affero General Public License v3.0
Bind two network interfaces to simulate a loop back.
License: GNU Affero General Public License v3.0
If bind can sometimes fall into an infinite loop.
CPU usage in non-interactive mode is over 100%.
Use URI https://api.github.com/repos/Labonte-LucPaul/ifbind/releases/latest
to get the latest version available and display message about new available version.
"tag_name"
Example:
{
"url": "https://api.github.com/repos/Labonte-LucPaul/ifbind/releases/41592671",
"assets_url": "https://api.github.com/repos/Labonte-LucPaul/ifbind/releases/41592671/assets",
"upload_url": "https://uploads.github.com/repos/Labonte-LucPaul/ifbind/releases/41592671/assets{?name,label}",
"html_url": "https://github.com/Labonte-LucPaul/ifbind/releases/tag/2.2.0",
"id": 41592671,
"author": {
"login": "Labonte-LucPaul",
"id": 2522843,
"node_id": "MDQ6VXNlcjI1MjI4NDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/2522843?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Labonte-LucPaul",
"html_url": "https://github.com/Labonte-LucPaul",
"followers_url": "https://api.github.com/users/Labonte-LucPaul/followers",
"following_url": "https://api.github.com/users/Labonte-LucPaul/following{/other_user}",
"gists_url": "https://api.github.com/users/Labonte-LucPaul/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Labonte-LucPaul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Labonte-LucPaul/subscriptions",
"organizations_url": "https://api.github.com/users/Labonte-LucPaul/orgs",
"repos_url": "https://api.github.com/users/Labonte-LucPaul/repos",
"events_url": "https://api.github.com/users/Labonte-LucPaul/events{/privacy}",
"received_events_url": "https://api.github.com/users/Labonte-LucPaul/received_events",
"type": "User",
"site_admin": false
},
"node_id": "MDc6UmVsZWFzZTQxNTkyNjcx",
"tag_name": "2.2.0",
"target_commitish": "master",
"name": "ifbind",
"draft": false,
"prerelease": false,
"created_at": "2021-04-17T20:12:59Z",
"published_at": "2021-04-17T20:16:23Z",
"assets": [
{
"url": "https://api.github.com/repos/Labonte-LucPaul/ifbind/releases/assets/35279226",
"id": 35279226,
"node_id": "MDEyOlJlbGVhc2VBc3NldDM1Mjc5MjI2",
"name": "ifbind",
"label": null,
"uploader": {
"login": "Labonte-LucPaul",
"id": 2522843,
"node_id": "MDQ6VXNlcjI1MjI4NDM=",
"avatar_url": "https://avatars.githubusercontent.com/u/2522843?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Labonte-LucPaul",
"html_url": "https://github.com/Labonte-LucPaul",
"followers_url": "https://api.github.com/users/Labonte-LucPaul/followers",
"following_url": "https://api.github.com/users/Labonte-LucPaul/following{/other_user}",
"gists_url": "https://api.github.com/users/Labonte-LucPaul/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Labonte-LucPaul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Labonte-LucPaul/subscriptions",
"organizations_url": "https://api.github.com/users/Labonte-LucPaul/orgs",
"repos_url": "https://api.github.com/users/Labonte-LucPaul/repos",
"events_url": "https://api.github.com/users/Labonte-LucPaul/events{/privacy}",
"received_events_url": "https://api.github.com/users/Labonte-LucPaul/received_events",
"type": "User",
"site_admin": false
},
"content_type": "application/octet-stream",
"state": "uploaded",
"size": 8028792,
"download_count": 7,
"created_at": "2021-04-17T20:16:08Z",
"updated_at": "2021-04-17T20:16:15Z",
"browser_download_url": "https://github.com/Labonte-LucPaul/ifbind/releases/download/2.2.0/ifbind"
}
],
"tarball_url": "https://api.github.com/repos/Labonte-LucPaul/ifbind/tarball/2.2.0",
"zipball_url": "https://api.github.com/repos/Labonte-LucPaul/ifbind/zipball/2.2.0",
"body": "* Fix issue when stats didn't display if interface did not received traffic\r\n* Add command to clear stats in interactive mode"
}
Import a config file with pre-defined binding interfaces. If interface, append arguments binding.
TBD format
->
^C[2020-06-04 12:10:29.096] [ifbinder] [info] Caught signal (2). [2020-06-04 12:10:29.096] [ifbinder] [info] Stopping bind tsw-port5 <=> tsw-port6 [2020-06-04 12:10:29.622] [ifbinder] [info] Stopping bind tsw-port5 <=> tsw-port6 [2020-06-04 12:10:29.622] [ifbinder] [info] Stopping bind tsw-port5 <=> tsw-port6
Should be:
^C[2020-06-04 12:10:29.096] [ifbinder] [info] Caught signal (2). [2020-06-04 12:10:29.096] [ifbinder] [info] Stopping bind tsw-port5 <=> tsw-port6 [2020-06-04 12:10:29.622] [ifbinder] [info] Stopping bind thread tsw-port5 -> tsw-port6 [2020-06-04 12:10:29.622] [ifbinder] [info] Stopping bind thread tsw-port6 -> tsw-port5
Forward the traffic on the same interface that was received.
[2020-06-04 12:07:57.774] [ifbinder] [debug] Sending packet tsw-port6 -> tsw-port5
ifbinder
should be ifbind
.
$ ./ifbind -B t30-1:t31-1,t30-2:t31-2 -I
logfile: "/home/dumitru/work/noviapp-automation/tools/ifbind.log"
Interactive mode
Type 'help' to list a set of commands
> list
1: t30-1 <=> t31-1 disconnected
2: t30-2 <=> t31-2 disconnected
> start
> terminate called recursively
terminate called after throwing an instance of 'Tins::pcap_error'
Aborted (core dumped)
Unfortunately I don't have the logs..
I think what happened was that 'ifbind' did not have permission to start capture on t30-.. interfaces, but I could be wrong.
Library dependencies of 2.3.1
$ ldd ./tools/ifbind
linux-vdso.so.1 (0x00007ffdea579000)
libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f3b05f24000)
libpcap.so.0.8 => /usr/lib/x86_64-linux-gnu/libpcap.so.0.8 (0x00007f3b05ed9000)
libssl.so.1.0.0 => not found
libcrypto.so.1.0.0 => not found
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3b05cf7000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3b05ba8000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3b05b8b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3b05b68000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3b05976000)
libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f3b0594d000)
libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f3b0592c000)
librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f3b0590c000)
libssh.so.4 => /usr/lib/x86_64-linux-gnu/libssh.so.4 (0x00007f3b0589c000)
libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f3b05889000)
libnettle.so.7 => /usr/lib/x86_64-linux-gnu/libnettle.so.7 (0x00007f3b0584f000)
libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f3b05679000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f3b0562c000)
libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f3b055d6000)
liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f3b055c3000)
libbrotlidec.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f3b055b5000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3b05599000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3b05fd5000)
libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f3b05417000)
libhogweed.so.5 => /usr/lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007f3b053e0000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f3b0535a000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f3b05084000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f3b04f4e000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f3b04f38000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f3b04e5b000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f3b04e28000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f3b04e21000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f3b04e12000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f3b04df6000)
libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f3b04dd9000)
libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f3b04d94000)
libbrotlicommon.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f3b04d6f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3b04d69000)
libffi.so.7 => /usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007f3b04d5d000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f3b04d56000)
libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f3b04d4a000)
libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f3b04cb5000)
libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f3b04c0e000)
libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f3b04bd6000)
libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007f3b04bbd000)
libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007f3b04b93000)
libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f3b04b7f000)
libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f3b04b31000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f3b04a08000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f3b049cd000)
compared with dependencies of the previous version
$ ldd ./tools/ifbind
linux-vdso.so.1 (0x00007ffebc965000)
libpcap.so.0.8 => /usr/lib/x86_64-linux-gnu/libpcap.so.0.8 (0x00007f99fa5a0000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f99fa3be000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f99fa26f000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f99fa254000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f99fa231000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f99fa03f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f99fa934000)
Having less dependencies is preferable, if possible.
One reason is that the host system does not require installation of system libraries, like OpenSSL or SQLite3, for example.
> connect
terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
Aborted
Enter a command and press SPACE to introduce a blank character on the command line, then press ENTER
> disconnect 1
Invalid command 'disconnect 1 '
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.