GithubHelp home page GithubHelp logo

7zx / fuckcensys Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 9 KB

Script to block all traffic from the Censys IP's and subnets.

Home Page: https://search.censys.io/

Shell 100.00%
censys security ufw ufw-firewall iot port-scanner port-scanning

fuckcensys's Introduction

FuckCensys

Script to block all traffic from the Censys search engine IP scanning tool using UFW (Uncomplicated Firewall) on Linux systems.

Setup

Prerequisites

  • Linux system with UFW installed.
  • jq installed for JSON parsing. If not installed, you can install it using your package manager (sudo apt-get install jq on Ubuntu/Debian).

Firewall Configuration

Ensure UFW is not enabled:

sudo ufw status verbose

If UFW is enabled, disable it:

sudo ufw disable

Clear existing rules:

sudo ufw reset

Set default rules:

sudo ufw default deny incoming
sudo ufw default allow outgoing

Add rules to prevent accidental lockout:

sudo ufw allow from 192.168.1.0/24
sudo ufw allow ssh

Enable UFW:

sudo ufw enable

Respond to the prompt with y.

Installation

Clone this repository to your system:

git clone https://github.com/7zx/FuckCensys/

Navigate to the cloned repository:

cd FuckCensys

Make the script executable:

chmod +x fuck-censys.sh

Usage

Run the script with sudo privileges to block traffic from Censys IP's and subnets:

sudo ./fuck-censys.sh

The script will download the current scanning IP addresses and subnets used by Censys and incorporate them into UFW's configuration. After execution, confirm the successful addition of rules by running:

sudo ufw status verbose

Scheduling

To keep the firewall rules updated, consider scheduling the script to run periodically. You can use cron for this purpose:

Open the cron table for editing:

sudo crontab -e

Add the following line to run the script weekly:

0 0 * * 1 /path/to/FuckCensys/fuck-censys.sh > /dev/null 2>&1

This will execute the script every Monday at midnight. Then, delete the rule by its number:

sudo ufw delete <rule_number>

fuckcensys's People

Contributors

7zx avatar

Stargazers

 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.