App-Route-Jail | force application-specific routing | Router library

 by   Intika-Linux-Firewall C Version: Current License: No License

kandi X-RAY | App-Route-Jail Summary

kandi X-RAY | App-Route-Jail Summary

App-Route-Jail is a C library typically used in Networking, Router applications. App-Route-Jail has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Tweaks to force application-specific routing on linux (based on grandrew/approute-utils)
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              App-Route-Jail has a low active ecosystem.
              It has 16 star(s) with 3 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of App-Route-Jail is current.

            kandi-Quality Quality

              App-Route-Jail has 0 bugs and 0 code smells.

            kandi-Security Security

              App-Route-Jail has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              App-Route-Jail code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              App-Route-Jail does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              App-Route-Jail releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of App-Route-Jail
            Get all kandi verified functions for this library.

            App-Route-Jail Key Features

            No Key Features are available at this moment for App-Route-Jail.

            App-Route-Jail Examples and Code Snippets

            No Code Snippets are available at this moment for App-Route-Jail.

            Community Discussions

            QUESTION

            How to resolve "setsockopt(3, SOL_SOCKET, SO_MARK, [10], 4) = -1 EPERM" Operation denied for none root users
            Asked 2019-May-08 at 07:14

            I got two network interfaces (ethernet and wlan). Now I found a little script on github (https://github.com/Intika-Linux-Firewall/App-Route-Jail) which seems to allow me to route specific applications through the none default gateway to loadbalance the traffic a little bit.

            The script is using the following call: setsockopt(sd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark));

            As I found out via an strace I got: '-1 EPERM Permission denied' (as show on http://man7.org/linux/man-pages/man7/capabilities.7.html this command needs cap_net_admin rights) The tool works when I use "sudo" infront of the command the socket is created with the none default gateway and works like intended (e.g. wget a file)

            Example: MARK=10 LD_PRELOAD=./mark.so wget -qO- ifconfig.me uses the default gateway (so not what I wanted) sudo MARK=10 LD_PRELOAD=./mark.so wget -qO- ifconfig.me returns the IP of the none default gateway (what I want but without using sudo)

            Some things I found on the internet and tried:

            • Setting File Capabilities (setcap cap_net_admin+eip) (still requires root somehow)
            • Using SUID Bit (chmod u+s) (no change at all)

            I expect the command to run without root privileges, so every application can use the none default gateway, but currently I need to use sudo to gain enough permissions to run the command on the correct interface. What am I missing to archive my goals?

            ...

            ANSWER

            Answered 2019-May-08 at 07:14

            You are looking to your problem from the wrong angle. Instead of marking the packets, you should try to force the application to bind to the correct interface in the first place.

            You could try the retro-solution explained here, which overrides bind() and connect() instead of socket().

            But more modern solution would be to create a separate network namespace and then run applications in their own namespace. Google ip netns for the examples. Creating and setting up the network namespace still requires root, but these privileges can be dropped before running the application. There are likely to be tools available to do that also.

            Source https://stackoverflow.com/questions/56031221

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install App-Route-Jail

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Intika-Linux-Firewall/App-Route-Jail.git

          • CLI

            gh repo clone Intika-Linux-Firewall/App-Route-Jail

          • sshUrl

            git@github.com:Intika-Linux-Firewall/App-Route-Jail.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Router Libraries

            react-router

            by remix-run

            react-router

            by ReactTraining

            vue-router

            by vuejs

            mux

            by gorilla

            ui-router

            by angular-ui

            Try Top Libraries by Intika-Linux-Firewall

            Iptables-Editor-Gui

            by Intika-Linux-FirewallRuby

            Force-Bind

            by Intika-Linux-FirewallC

            Tomoyo-Application-Firewall

            by Intika-Linux-FirewallC

            Bind-Interface-IP

            by Intika-Linux-FirewallC

            Shorewall

            by Intika-Linux-FirewallPerl