Giter VIP home page Giter VIP logo

simplenetfilt's Introduction

simplenetfilt

This is a simple project to disable outside network access for linux programs (primarily developed for usage with wine). It optionally allows loopback (localhost / 127.0.0.1) and local network access (192.168.*.*, 10.*.*.*, *.local).

This was created out of a need to run some programs under wine without outside network access. Loopback was needed for some IPC work the programs required. After spending days wrestling with firejail, X11, and iptables, I gave up and decided to write this.

Current limitations

  • Only outgoing connections are filtered.
  • IPv6 isn't supported. Currently it blocks all outgoing IPv6 connections.
  • Only tested under wine and a few basic programs (curl, ping, firefox). Leaks may exist for other software.
  • No whitelist/blacklist.

Please open an issue if these limitations cause a problem for you.

Usage

Building

mkdir build && cd build
cmake ..
make
sudo make install

Running

Using the wrapper:

simplenetfilt program [args...]

Manual LD_PRELOAD:

LD_PRELOAD=libsimplenetfilt.so program [args...]

Note that when using the manual method, if it has been installed to /usr/local/lib, you may need to add /usr/local/lib to LD_LIBRARY_PATH.

Configuration

The following environment variables can be configured:

  • SIMPLENETFILT_ALLOW_LOCALHOST - Allows localhost / 127.0.0.1 access. Default: true
  • SIMPLENETFILT_ALLOW_LOCALNET - Allows local network access. Default: false

simplenetfilt's People

Contributors

qsniyg avatar

Stargazers

Andrew Schott avatar Benjamin Green avatar  avatar  avatar ʞ-uɐʇsıɹʇ avatar Darren Anderson avatar  avatar JS Deck avatar  avatar ilana avatar Ahmed Elsayed avatar  avatar

Watchers

 avatar

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.