Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 30th, 2020 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # At the ASG, create a DNAT for UDP Traffic Port 9 to $DNATDST
  4.  
  5. # Configuration
  6. MAC=00:26:2d:00:02:6b
  7.  
  8. NIC=eth0
  9. DNATDST=10.12.28.2
  10.  
  11. WAFHOST=homeserver.mediavillage.de
  12.  
  13.  
  14. # Map Traffic going Fake-IP being flooded broadcasted
  15. ip neigh change $DNATDST lladdr ff:ff:ff:ff:ff:ff nud permanent dev $NIC > /dev/null 2>&1
  16. ip neigh add    $DNATDST lladdr ff:ff:ff:ff:ff:ff nud permanent dev $NIC > /dev/null 2>&1
  17.  
  18. # Monitor Reverse-Proxy and wake up Server if necessary
  19. (
  20. OLD=""
  21. while sleep 1; do
  22.   NEW=`awk '/server=\"'"$WAFHOST"'\"/ && /statuscode=\"503\"/ {print }' /var/log/reverseproxy.log | tail -1`
  23.   echo $NEW
  24.   if [ "$NEW" != "" -a "$NEW" != "$OLD" ]; then
  25.     CURDATE=`date +"%Y:%m:%d-%T"`
  26.     CURHOSTNAME=`hostname -f`
  27.     CURPID=$$
  28.     echo "$CURDATE $CURHOSTNAME [daemon:info] wol[$CURPID]:  Wake on WAF: $WAFHOST [$MAC]" >> /var/log/fallback.log
  29.     ether-wake $MAC
  30.     sleep 180
  31.     OLD=$NEW
  32.   fi
  33. done
  34. ) > /dev/null 2>&1 &
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top