#!/bin/sh export DATE="10.3.2010";SCRIPT=${0#/rom} export TITLE="Admin: Zapp P2P Filter" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Admin: Zapp P2P Filter EOF case $REQUEST_METHOD in POST) read QUERY_STRING ;;esac case $QUERY_STRING in "");;*) IFS=\&;set $QUERY_STRING;unset IFS;eval $* case $post_manual_zapp in "");;*) case $zapp_ip in "");;*)/etc/init.d/S92zapp block $zapp_ip >&-;;esac case $unzapp_ip in "");;*)/etc/init.d/S92zapp unblock $unzapp_ip >&-;;esac QUERY_STRING= ;;esac ;;esac case $QUERY_STRING in "") #Speedups ff_zapp_debug="$(nvram get ff_zapp_debug)" cat<
Zapp Threshold: (Default 150 if empty)
Zapp Blocking Time: (5-1439 Minutes, default 360 if empty)
Trusted IPs:
Socks5 Access from IPs:
Conntrack Debug:
 
   

Note: The "Zapp" file sharing filter will block IPs from which open too much connections to different hosts on the Internet concurrently. Check, block or unblock IPs on the routers command line (enter "/etc/init.d/S92zapp help"). If you restart the router, all IP blocks will be cancelled automatically.

Status

Select a blocked IP from the output of "/etc/init.d/S92zap status":
EOF echo "
"
/etc/init.d/S92zapp status|sed 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\).*/& ()/'
echo "
" cat<
New Block for:
 

Note: There is a file sharing program for VoIP telephony over the Internet named "Skype". You should offer a Socks5 proxy for this. Inform Skype users about the necessary configuration (see Skype Page).

EOF ;;*) IFS=\&;set $QUERY_STRING;unset IFS;eval $* DIRTY= case $post_zapp in "");;*) for V in ff_zapp_thresh ff_zapp_time ff_zapp_trusted ff_srelay ff_zapp_debug; do eval "C=\$$V" C=$(unescape $C) case $(nvram get $V) in $C);;*) DIRTY=1 nvram set $V="$C" ;;esac done ;;esac case $DIRTY in "") cat<No settings are changed. EOF ;;*) nvram commit>/dev/null 2>&1 cat<The changed settings are committed. The settings are active after the next Restart. EOF ;;esac ;;esac . ${SCRIPT%/*}/cgi-bin-post.sh