|
|
|
@ -131,6 +131,11 @@ build_opts() { |
|
|
|
then |
|
|
|
OPTS+=" --b2b-url=$B2B_URL" |
|
|
|
fi |
|
|
|
|
|
|
|
if [[ -n "$LOG_LEVEL" ]] |
|
|
|
then |
|
|
|
OPTS+=" --log-level=$LOG_LEVEL" |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
start() { |
|
|
|
@ -139,10 +144,12 @@ start() { |
|
|
|
then |
|
|
|
echo "Loading module for in-kernel packet forwarding" |
|
|
|
modprobe xt_MEDIAPROXY |
|
|
|
iptables -I INPUT -p udp -j MEDIAPROXY --id $TABLE |
|
|
|
iptables -N mediaproxy |
|
|
|
iptables -t filter -A INPUT -j mediaproxy |
|
|
|
iptables -I mediaproxy -p udp -j MEDIAPROXY --id $TABLE |
|
|
|
if [[ IP6 == 1 ]] |
|
|
|
then |
|
|
|
ip6tables -I INPUT -p udp -j MEDIAPROXY --id $TABLE |
|
|
|
ip6tables -I mediaproxy -p udp -j MEDIAPROXY --id $TABLE |
|
|
|
fi |
|
|
|
|
|
|
|
cat <<EOF > "$cachefile" |
|
|
|
@ -168,10 +175,11 @@ stop() { |
|
|
|
. "$cachefile" |
|
|
|
echo "Unloading module for in-kernel packet forwarding" |
|
|
|
echo "del $TABLE" > /proc/mediaproxy/control |
|
|
|
iptables -D INPUT -p udp -j MEDIAPROXY --id $CUR_TABLE |
|
|
|
iptables -D mediaproxy -j MEDIAPROXY --id $CUR_TABLE |
|
|
|
iptables -D mediaproxy -p udp -j MEDIAPROXY --id $CUR_TABLE |
|
|
|
if [[ CUR_IP6 == 1 ]] |
|
|
|
then |
|
|
|
ip6tables -D INPUT -p udp -j MEDIAPROXY --id $CUR_TABLE |
|
|
|
ip6tables -D mediaproxy -p udp -j MEDIAPROXY --id $CUR_TABLE |
|
|
|
fi |
|
|
|
# rmmod xt_MEDIAPROXY |
|
|
|
rm -f $cachefile |
|
|
|
|