Fixing rfc1918 outbound blocking (I hope)
parent
ab4ccedefd
commit
fb6ecc1baa
|
@ -151,8 +151,8 @@ if [ "$BLOCK_OUTGOING_RFC1918" ]; then
|
||||||
for i in $BLOCK_OUTGOING_RFC1918; do
|
for i in $BLOCK_OUTGOING_RFC1918; do
|
||||||
display_c BLUE "$i " N
|
display_c BLUE "$i " N
|
||||||
for x in $RFC1918_SPACE; do
|
for x in $RFC1918_SPACE; do
|
||||||
$IPTABLES -A OUTPUT -o $i -s $x -j DROP
|
$IPTABLES -A INPUT -i $i -s $x -j DROP
|
||||||
$IPTABLES -A FORWARD -o $i -s $x -j DROP
|
$IPTABLES -A FORWARD -i $i -s $x -j DROP
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
echo -ne "\n"
|
echo -ne "\n"
|
||||||
|
@ -241,10 +241,10 @@ if [ "$BLOCKTCPPORTS" ] || [ "$BLOCKUDPPORTS" ]; then
|
||||||
for i in $BLOCKTCPPORTS; do
|
for i in $BLOCKTCPPORTS; do
|
||||||
echo -en "${PURPLE}TCP${DEFAULT_COLOR}/${GREEN}$i "
|
echo -en "${PURPLE}TCP${DEFAULT_COLOR}/${GREEN}$i "
|
||||||
$IPTABLES -A OUTPUT -p tcp --dport $i --syn -j DROP
|
$IPTABLES -A OUTPUT -p tcp --dport $i --syn -j DROP
|
||||||
if [ "$NATRANGE" ]; then
|
#if [ "$NATRANGE" ]; then
|
||||||
for src in $NATRANGE; do
|
# for src in $NATRANGE; do
|
||||||
$IPTABLES -A FORWARD -p tcp -s $src --dport $i --syn -j DROP
|
# $IPTABLES -A FORWARD -p tcp -s $src --dport $i --syn -j DROP
|
||||||
done
|
# done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
@ -252,10 +252,10 @@ if [ "$BLOCKTCPPORTS" ] || [ "$BLOCKUDPPORTS" ]; then
|
||||||
for i in $BLOCKUDPPORTS; do
|
for i in $BLOCKUDPPORTS; do
|
||||||
echo -en "${BLUE}UDP${DEFAULT_COLOR}/${GREEN}$i "
|
echo -en "${BLUE}UDP${DEFAULT_COLOR}/${GREEN}$i "
|
||||||
$IPTABLES -A OUTPUT -p udp --dport $i -j DROP
|
$IPTABLES -A OUTPUT -p udp --dport $i -j DROP
|
||||||
if [ "$NATRANGE" ]; then
|
#if [ "$NATRANGE" ]; then
|
||||||
for src in $NATRANGE; do
|
# for src in $NATRANGE; do
|
||||||
$IPTABLES -A FORWARD -p udp -s $src --dport $i -j DROP
|
# $IPTABLES -A FORWARD -p udp -s $src --dport $i -j DROP
|
||||||
done
|
# done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue