Put back the ipv6 tables entries (without the IF wrapper).

pull/146/head
Damian Ivereigh 10 years ago
parent 198b0c976f
commit 76bebd5031

@ -197,13 +197,15 @@ start() {
firewall-cmd --direct --add-chain ipv4 filter rtpengine firewall-cmd --direct --add-chain ipv4 filter rtpengine
firewall-cmd --direct --add-rule ipv4 filter INPUT_prefilter 0 -j rtpengine firewall-cmd --direct --add-rule ipv4 filter INPUT_prefilter 0 -j rtpengine
firewall-cmd --direct --add-rule ipv4 filter rtpengine 0 -p udp -j RTPENGINE --id $TABLE firewall-cmd --direct --add-rule ipv4 filter rtpengine 0 -p udp -j RTPENGINE --id $TABLE
firewall-cmd --reload firewall-cmd --direct --add-rule ipv6 filter rtpengine 0 -p udp -j RTPENGINE --id $TABLE
firewall-cmd --reload
else else
iptables -N rtpengine iptables -N rtpengine
# We insert the rtpengine rule at the top of the input chain # We insert the rtpengine rule at the top of the input chain
iptables -t filter -I INPUT_prefilter -j rtpengine iptables -t filter -I INPUT_prefilter -j rtpengine
iptables -I rtpengine -p udp -j RTPENGINE --id $TABLE iptables -I rtpengine -p udp -j RTPENGINE --id $TABLE
fi ip6tables -I rtpengine -p udp -j RTPENGINE --id $TABLE
fi
cat <<EOF > "$cachefile" cat <<EOF > "$cachefile"
CUR_TABLE=$TABLE CUR_TABLE=$TABLE
@ -231,11 +233,13 @@ stop() {
if [[ $? == 0 ]] if [[ $? == 0 ]]
then then
firewall-cmd --direct --remove-rules ipv4 filter rtpengine firewall-cmd --direct --remove-rules ipv4 filter rtpengine
firewall-cmd --direct --remove-rules ipv6 filter rtpengine
firewall-cmd --direct --remove-rule ipv4 filter INPUT_prefilter 0 -j rtpengine firewall-cmd --direct --remove-rule ipv4 filter INPUT_prefilter 0 -j rtpengine
firewall-cmd --direct --remove-chain ipv4 filter rtpengine firewall-cmd --direct --remove-chain ipv4 filter rtpengine
firewall-cmd --reload firewall-cmd --reload
else else
iptables -D rtpengine -p udp -j RTPENGINE --id $CUR_TABLE iptables -D rtpengine -p udp -j RTPENGINE --id $CUR_TABLE
ip6tables -D rtpengine -p udp -j RTPENGINE --id $CUR_TABLE
iptables -t filter -D INPUT -j rtpengine iptables -t filter -D INPUT -j rtpengine
iptables -X rtpengine iptables -X rtpengine
fi fi

Loading…
Cancel
Save