Changes

Jump to: navigation, search

BlackBlockGoogle

56 bytes added, 11:18, 27 April 2018
no edit summary
------
-- iptsetup.sh -- <pre>#!/bin/sh### setup domain.com name fwmark##IP=`nslookup $1 | grep -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | tail -n1 | cut -d\ -f3`AS=`wget -q -O - http://ipinfo.io/$IP/org | cut -f1 -d \ | sed -e 's/AS//'`
echo '#!/bin/sh' > add_$2.sh
echo '#!/bin/sh' > del_$2.sh
chmod 750 del_$2.sh
NETWORKS=`wget -O - http://stat.ripe.net/data/announced-prefixes/data.yaml?resource=$AS|grep prefix\:|grep -v \:\:|awk '{print $3}'`
echo "iptables -t mangle -N $2_ip" >> add_$2.sh
echo "iptables -t mangle -X $2_ip" >> del_$2.sh
echo "iptables -t mangle -X $2_do" >> del_$2.sh
root@OpenWrt:</usr/sbin#pre> 13Do, for example:03so you would do "iptsetup.sh google.com gl 1"13:04that that would create for you add_gl.sh and del_gl.sh
13
edits

Navigation menu