Giter Site home page Giter Site logo

pywall's Introduction

PyWall

A Python firewall: Because slow networks are secure networks.

Installation

This section assumes that you are installing this program on Ubuntu 14.04 LTS. This firewall should work on other Linux systems, but safety not guaranteed.

First, install the required packages. On Ubuntu, these are iptables, python, python-pip, build-essential, python-dev, and libnetfilter-queue-dev. Next, use pip2 to install the project dependencies, which can be found in requirements.txt.

The commands for both these operations are:

sudo apt-get install python python-pip iptables build-essential python-dev libnetfilter-queue-dev
pip install --user -r requirements.txt

Running

The main file is main.py, which needs to be run as root to modify IPTables. Additionally, main needs to receive a JSON configuration file as its first argument. If running with the example configuration, the command is:

sudo python2 main.py examples/example.json

To stop PyWall, press Control-C.

Troubleshooting

PyWall should undo its changes to IPTables after exiting. However, if you are unable to access the internet after exiting PyWall, view existing IPTables rules with sudo iptables -nL. If a rule with the target chain NFQueue lingers, delete it with sudo iptables -D INPUT -j NFQUEUE --queue-num [undesired-queue-number].

For INPUT rules, the command is sudo iptables -D INPUT -j NFQUEUE --queue-num 1. For OUTPUT rules, the command is sudo iptables -D OUTPUT -j NFQUEUE --queue-num 2.

In case PyWall gives a message that another application has the xtables lock, Control-C the server, ensure that all the IPTables rules are cleared, and restart PyWall.

pywall's People

Contributors

ajm188 avatar yigitk 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.