summaryrefslogtreecommitdiff
path: root/templates/firewall/conntrack-hash-size/node.def
blob: 0d11fae03918b5ddc46dc1baf4b09f2f669c9810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
help: Set hash size for connection tracking table
type: u32

default: 4096

comp_help:Possible completions:
  <1 - 50000000>\tSize of hash to use for connection tracking table

syntax:expression: ($VAR(@) >= 1 && $VAR(@) <= 50000000) ; "Value must be between 1 and 50,000,000"

update:
        if ! grep -q "nf_conntrack hashsize=$VAR(@)$" /etc/modprobe.d/vyatta_nf_conntrack
        then
          sudo sh -c "sed -i -e '/options nf_conntrack hashsize/d' \
                /etc/modprobe.d/vyatta_nf_conntrack"
          sudo sh -c "echo options nf_conntrack hashsize=$VAR(@) >> \
                /etc/modprobe.d/vyatta_nf_conntrack"
          echo "Updated conntrack hash size. This change will take affect when the system is rebooted."
        fi