summaryrefslogtreecommitdiff
path: root/templates/system/conntrack/modules/gre/disable/node.def
blob: f6f954609a2d1efc172ed06e46bb59a080f2baf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
help: Disable GRE connection tracking

# GRE shouldn't be disabled when PPTP is enabled because PPTP depends on it
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
          echo "Error: can not disable GRE connection tracking when PPTP connection tracking is enabled!"
          exit 1
        fi

delete: sudo modprobe nf_conntrack_proto_gre
        sudo modprobe nf_nat_proto_gre