{"repo":"JsBergbau/BindToInterface","free":true,"listed":false,"github":"https://github.com/JsBergbau/BindToInterface","clone":"git clone https://github.com/JsBergbau/BindToInterface.git","description":"With this program you can bind applications to a specific network interface / network adapter. This is very useful if you have multiple (internet) connections and want your program to use a specific one.","language":"C","stars":144,"topics":["dns","bound-interface","network","privacy","privacy-protection","vpn","internet-connection","dns-traffic","networking","linux"],"license":"AGPL-3.0","category":"networking-infra","readme_excerpt":"BindToInterface - securely bind a program to a specific network interface or network adapter Bind To Interface is a useful program for unix/linux if you have multiple network interfaces or adapters and want your program use strictly only one or none. You don't have to bother with routing tables, network namespaces or iptables and marking packets. BindToInterface is very flexible. You can set exceptions to which IPs no binding should be made. This is especially useful if your program still needs to communicate with localhost. For example if you make an outgoing ssh connection, bind it to eth1 it couldn't reach localhost without the bind exception. How does bind to network interface work? BindToInterface uses a feature called dynamic linking. Every program that makes an internet connection does this by making an API call to the operating system. In this case this API function is called connect . To bind to a specific network interface this program intercepts this call, decides if it has to bind to an interface and then calls the original connect function of the operating system. This works only if standard libraries are used. When using go programs for example, which uses static linked libraries, then this won't work and data would get leaked. If you know other examples where binding doesn't work, please open an issue. Build BindToInterface Download the source code and compile it with gcc -nostartfiles -fpic -shared bindToInterface.c -o bindToInterface.so -ldl -D GNU SOURCE Usa","default_branch":null,"files":null,"tree":[],"storefront":"/r/JsBergbau","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/JsBergbau/BindToInterface/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}