summaryrefslogtreecommitdiff
path: root/templates-cfg/system/conntrack/tcp
diff options
context:
space:
mode:
authorDaniil Baturin <daniil.baturin@vyatta.com>2011-11-04 05:55:45 +0700
committerDaniil Baturin <daniil.baturin@vyatta.com>2011-11-04 05:55:45 +0700
commite59537545e40756a893134c25eff533ccce3adb8 (patch)
tree85110d89d4ea23c2650b0d0f42b3cbd32a150dd9 /templates-cfg/system/conntrack/tcp
parent174565005c06c4b7cc6f64b977f63f87b9bd75df (diff)
downloadvyatta-conntrack-e59537545e40756a893134c25eff533ccce3adb8.tar.gz
vyatta-conntrack-e59537545e40756a893134c25eff533ccce3adb8.zip
Move templates t templates-cfg to let op mode templates also exist.
Diffstat (limited to 'templates-cfg/system/conntrack/tcp')
-rw-r--r--templates-cfg/system/conntrack/tcp/half-open-connections/node.def13
-rw-r--r--templates-cfg/system/conntrack/tcp/loose/node.def50
-rw-r--r--templates-cfg/system/conntrack/tcp/max-retrans/node.def13
-rw-r--r--templates-cfg/system/conntrack/tcp/node.def1
4 files changed, 77 insertions, 0 deletions
diff --git a/templates-cfg/system/conntrack/tcp/half-open-connections/node.def b/templates-cfg/system/conntrack/tcp/half-open-connections/node.def
new file mode 100644
index 0000000..9474463
--- /dev/null
+++ b/templates-cfg/system/conntrack/tcp/half-open-connections/node.def
@@ -0,0 +1,13 @@
+type: u32
+
+help: Maximum number of TCP half-open connections
+
+default: 512
+
+val_help: u32:1-2147483647; Generic connection timeout in seconds
+
+syntax:expression: ($VAR(@) >= 1 && $VAR(@) <= 2147483647) ; "Value must be between 1 and 2147483647"
+
+update: sudo sysctl -q -w net/ipv4/tcp_max_syn_backlog=$VAR(@)
+
+delete: sudo sysctl -q -w net/ipv4/tcp_max_syn_backlog=512
diff --git a/templates-cfg/system/conntrack/tcp/loose/node.def b/templates-cfg/system/conntrack/tcp/loose/node.def
new file mode 100644
index 0000000..06706a2
--- /dev/null
+++ b/templates-cfg/system/conntrack/tcp/loose/node.def
@@ -0,0 +1,50 @@
+#
+# This parameter directs the netfilter TCP connection tracking modules
+# (nf_conntrack, and others) to either allow or disallow the tracking
+# of TCP connections which are "previously established". This
+# includes all cases where the three-way connection opening handshake
+# was not seen by this machine. That includes the case the connection
+# was opened before this machine booted. It also includes cases where
+# the packets comprising the three-way handshake were routed via some
+# other router.
+#
+# If this parameter is set to "enable", tracking such connections is
+# allowed. If disabled, such tracking is disabled.
+# default value - 1
+
+type: txt
+
+help: Policy to track previously established connections
+
+val_help: enable; Allow tracking of previously established connections
+val_help: disable; Do not allow tracking of previously established connections
+
+default: "enable"
+
+syntax:expression: $VAR(@) in "enable", "disable"; "must be either enable or disable"
+
+update:
+ if [ ! -e /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_loose ]; then
+ sudo modprobe nf_conntrack_ipv4
+ fi
+ if [ "$VAR(@)" = "enable" ]; then
+ sudo sysctl -q -w net/ipv4/netfilter/ip_conntrack_tcp_loose=1
+ elif [ "$VAR(@)" = "disable" ]; then
+ sudo sysctl -q -w net/ipv4/netfilter/ip_conntrack_tcp_loose=0
+ else
+ echo "Invalid parameter: $VAR(@)"
+ exit 1
+ fi
+
+delete:
+ if [ ! -e /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_loose ]; then
+ sudo modprobe nf_conntrack_ipv4
+ fi
+ sudo sysctl -q -w net/ipv4/netfilter/ip_conntrack_tcp_loose=1
+
+
+
+
+
+
+
diff --git a/templates-cfg/system/conntrack/tcp/max-retrans/node.def b/templates-cfg/system/conntrack/tcp/max-retrans/node.def
new file mode 100644
index 0000000..bf56f1f
--- /dev/null
+++ b/templates-cfg/system/conntrack/tcp/max-retrans/node.def
@@ -0,0 +1,13 @@
+type: u32
+
+help: TCP maximum retransmit attempts
+
+default: 3
+
+val_help: u32:1-2147483647; Generic connection timeout in seconds
+
+syntax:expression: ($VAR(@) >= 1 && $VAR(@) <= 2147483647) ; "Value must be between 1 and 2147483647"
+
+update: sudo sysctl -q -w net/netfilter/nf_conntrack_tcp_max_retrans=$VAR(@)
+
+delete: sudo sysctl -q -w net/netfilter/nf_conntrack_tcp_max_retrans=3
diff --git a/templates-cfg/system/conntrack/tcp/node.def b/templates-cfg/system/conntrack/tcp/node.def
new file mode 100644
index 0000000..67543ca
--- /dev/null
+++ b/templates-cfg/system/conntrack/tcp/node.def
@@ -0,0 +1 @@
+help: TCP options \ No newline at end of file