GithubHelp home page GithubHelp logo

internet-block's Introduction

Internet Block

Block Internet access for a list of devices on your LAN on a given schedule. For a much longer introduction and more explanation, see my blog post about this. The short summary is, this sets up ettercap to block internet using an ARP based man-in-middle attack. It runs ettercap on a schedule so you can, for example, block your kids devices during the hours when you wish they were sleeping. You can run set this up on any old computer running Linux. It can be a very low-power device like an old computer or Raspberry Pi.

You will need to edit lan-hosts to have the list of hosts you want to block and your gateway. You will also need to edit internet-stop.service. Replace the first IP address with the address of your gateway, and the list of IP addresses with the list of IP addresses you want to block. This assumes that the IP addresses of the devices you want to block will not change over time. I believe you could use MAC addresses instead of IP addresses, but I haven’t tested this.

Also edit internet-stop.timer and internet.start.timer to adjust the start and stop times, if you want.

Also edit playbook.yaml and replace /home/pi with the path to your user’s home directory on the device you are installing this on.

You’ll also need to edit ansible-host and put in the hostname of the machine you are going to install this on. Create a ~/.ssh/config file if you need to use a username other than your own or a special ssh key to access the machine.

Once you have edited the files, run:

ansible-playbook -i ansible-host playbook.yaml

It will set up the systemd services and timers to block internet during the hours you chose.

internet-block's People

Contributors

krupan avatar

Watchers

James Cloos avatar  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.