Skip to content

Instantly share code, notes, and snippets.

@ehvanr
ehvanr / ban_dupes.py
Last active May 2, 2018 14:17
Duplicate User Plex IPTables Drop Rule
#!/usr/bin/env python
# DESCRIPTION:
#
# This script is meant to be run as a root cronjob. You can run it however frequently
# you desire - I run it every minute. It determines the number of streams, and cross
# references the usernames. If there are duplicate usernames, it checks if the IP
# addresses are different. If so, it generates IPTables rules that will drop packets
# from both IP addresses.
#