Giter VIP home page Giter VIP logo

iptables-admin-whitelist's Introduction

iptables-admin-whitelist

IPTables Admin Whitelist

Usage:

Create /etc/iptadmin.lst (or specify a different file by changing the list= variable). This file may contain hostnames, IPv4 and IPv6 addresses, or IPv4 and IPv6 CIDR blocks. Basic sanity checks are in place but proper values fall solely on you.

Change the dudeservers= variable to the comma-separated IP addresses or hostnames of your Dude Servers. Once your Dude Servers are added to a device, they will not be removed when the address list is purged and rewritten. This will prevent Dude Server disconnects when the address list is updated.

Make the script executable and run. Script will generate the file you specify by changing the file= value.

Automation:

It is recommended that you run the script with systemd timers:

printf '[Unit]
Description=IPTables Admin Whitelist Creator
[Service]
Type=simple
ExecStart=/usr/local/bin/iptadmin
[Install]
WantedBy=multi-user.target
' | tee /etc/systemd/system/iptadmin.service

printf '[Unit]
Description=IPTables Admin Whitelist Scheduler
[Timer]
OnCalendar=*:0/5
Unit=iptadmin.service
[Install]
WantedBy=multi-user.target
' | tee /etc/systemd/system/iptadmin.timer

systemctl daemon-reload
systemctl enable iptadmin.timer

On each client device, install the script using the following. The script will install the cron job, and maintain it:

curl -kOs https://example.com/admin.ipt /tmp/admin.ipt && sh /tmp/admin.ipt

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.