summaryrefslogtreecommitdiff
path: root/templates/system/conntrack/modules/gre/disable/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/conntrack/modules/gre/disable/node.def')
-rw-r--r--templates/system/conntrack/modules/gre/disable/node.def11
1 files changed, 9 insertions, 2 deletions
diff --git a/templates/system/conntrack/modules/gre/disable/node.def b/templates/system/conntrack/modules/gre/disable/node.def
index 2ca281de..f6f95460 100644
--- a/templates/system/conntrack/modules/gre/disable/node.def
+++ b/templates/system/conntrack/modules/gre/disable/node.def
@@ -1,8 +1,15 @@
help: Disable GRE connection tracking
# GRE shouldn't be disabled when PPTP is enabled because PPTP depends on it
-create: cli-shell-api existsEffective system conntrack modules pptp disable
+create: cli-shell-api exists system conntrack modules pptp disable
if [ $? == 0 ]; then
+ # Unload PPTP modules if they are loaded
+ lsmod | grep -e "^nf_nat_pptp" 2>&1 >/dev/null
+ if [ $? == 0 ]; then
+ sudo rmmod nf_nat_pptp
+ sudo rmmod nf_conntrack_pptp
+ fi
+ # And GRE modules then
sudo rmmod nf_nat_proto_gre
sudo rmmod nf_conntrack_proto_gre
else
@@ -11,4 +18,4 @@ create: cli-shell-api existsEffective system conntrack modules pptp disable
fi
delete: sudo modprobe nf_conntrack_proto_gre
- sudo modprobe nf_nat_proto_gre \ No newline at end of file
+ sudo modprobe nf_nat_proto_gre