Snort - the de facto standard for intrusion detection/prevention
next up previous contents
Next: IP Variables and IP Up: Configuring Snort Previous: Format   Contents


Variables

Three types of variables may be defined in Snort:

  • var
  • portvar
  • ipvar

Note:   Note: 'ipvar's are only enabled with IPv6 support. Without IPv6 support, use a regular 'var'.

These are simple substitution variables set with the var, ipvar, or portvar keywords as shown in Figure 2.1.

Figure 2.1: Example of Variable Definition and Usage
\begin{figure}\begin{verbatim}var RULES_PATH rules/
portvar MY_PORTS [22,80,10...
... msg:''SYN packet'';)
include $RULE_PATH/example.rule\end{verbatim}
\end{figure}



Subsections

Steven Sturges 2008-04-01