Guest User

Untitled

a guest
Dec 6th, 2016
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #!/usr/bin/env bash
  3.  
  4. set -x
  5.  
  6. iptables -t mangle -L PREROUTING |grep bypasspool
  7. if [ "$?" -ne "0" ];then
  8. iptables -t mangle -I PREROUTING -m set --match-set bypasspool dst,src -j DIVERT
  9. fi
  10.  
  11. ipset create bypasspool hash:ip
  12. while read item; do
  13. echo $item
  14. host -4 $item |grep "has address"|awk '{print $4}' |xargs -l1 ipset add bypasspool
  15. done < domains-to-bypass.txt
  16. set +x
RAW Paste Data