Category: it security

Iptabels add blocklist while systemctl start

add iptables with binarydefense.com and ip-projects.de to the rules.emergingthreats.net blocklist

☆ carloscomputer-banlist ☆

Edit systemd iptables.service

[Unit]
Description=IPv4 Packet Filtering Framework
Before=network-pre.target
Wants=network-pre.target

[Service]
Type=oneshot
ExecStart=/usr/bin/iptables-restore /etc/iptables/iptables.rules
ExecStartPost=/etc/script/ipban.list.sh
ExecReload=/usr/bin/iptables-restore /etc/iptables/iptables.rules
ExecStop=/usr/lib/systemd/scripts/iptables-flush
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

The iptables script alpha2 contains

you should modify as you need -I or -A and ‘input’ chain

#!/bin/sh
curl https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt |sed 1,41d > /usr/share/webapps/wordpress/wp-content/uploads/carloscomputer-banlist
curl https://www.binarydefense.com/banlist.txt |sed 1,12d >> /usr/share/webapps/wordpress/wp-content/uploads/carloscomputer-banlist
curl https://sslbl.abuse.ch/blacklist/sslipblacklist.txt |sed 1,9d >> /usr/share/webapps/wordpress/wp-content/carloscomputer-banlist
curl http://mirror.ip-projects.de/ip-blacklist >> /usr/share/webapps/wordpress/wp-content/uploads/carloscomputer-banlist
for i in `cat /usr/share/webapps/wordpress/wp-content/uploads/carloscomputer-banlist`; do
iptables -A INPUT -s $i -j DROP
done

check banned iptable

iptables -L -n |grep DROP -c
2541

 

install magisk xposed framework and xprivacy on klte sm-g900f

download xposed framework magisk unity zip

here the xda thread: https://forum.xda-developers.com/xposed/10-31-2017-xposed-framework-v88-2-t3697756

backup

new releases

Reboot in to recovery mode and install the unity zip.

Reboot the device and download xprivacy

After downloading xprivacy (xrprivacy lua is recommended) in the Xposed.app https://forum.xda-developers.com/showthread.php?t=3034811

You have to activate the module and reboot your device.

 

Have fun and block all not needed connections.