Browse Source

fix el init script inserting duplicate iptables rules

closes #696

Change-Id: Ie7d7bc6ec152c8b9cbae08422338563169158f97
changes/25/26725/2
Richard Fuchs 7 years ago
parent
commit
aaccc10630
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      el/rtpengine.init

+ 7
- 3
el/rtpengine.init View File

@ -169,10 +169,14 @@ start() {
firewall-cmd --reload
else
for fw in iptables ip6tables;do
$fw -N rtpengine
# We insert the rtpengine rule at the top of the input chain
$fw -t filter -I INPUT -j rtpengine
$fw -I rtpengine -p udp -j RTPENGINE --id "$TABLE"
if ! $fw -t filter -C INPUT -j rtpengine 2> /dev/null; then
$fw -N rtpengine
$fw -t filter -I INPUT -j rtpengine
fi
if ! $fw -I rtpengine -p udp -j RTPENGINE --id "$TABLE" 2> /dev/null; then
$fw -I rtpengine -p udp -j RTPENGINE --id "$TABLE"
fi
done
fi


Loading…
Cancel
Save