Rename the notrack file to conntrack

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-08-02 11:02:17 -07:00
parent f2dd43855e
commit 833e54c9c3
10 changed files with 186 additions and 122 deletions

View File

@ -322,6 +322,7 @@ our %config_files = ( #accounting => 1,
actions => 1,
blacklist => 1,
clear => 1,
conntrack => 1,
ecn => 1,
findgw => 1,
hosts => 1,
@ -345,6 +346,7 @@ our %config_files = ( #accounting => 1,
route_rules => 1,
routes => 1,
routestopped => 1,
rtrules => 1,
rules => 1,
scfilter => 1,
secmarks => 1,

View File

@ -124,7 +124,17 @@ sub setup_notrack() {
my $format = 1;
my $action = 'NOTRACK';
if ( my $fn = open_file 'notrack' ) {
my $fn = open_file( 'notrack' );
if ( $fn ) {
if ( -f ( my $fn1 = find_file 'conntrack' ) ) {
warning_message "Both $fn and $fn1 exist: $fn1 will be ignored";
}
} else {
$fn = open_file( 'conntrack' );
}
if ( $fn ) {
first_entry "$doing $fn...";

View File

@ -0,0 +1,22 @@
#
# Shorewall version 4 - conntrack File
#
# For information about entries in this file, type "man shorewall-conntrack"
#
#############################################################################################
FORMAT 2
#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/
# PORT(S) PORT(S) GROUP
?IF $AUTOHELPERS && __CT_TARGET
CT:helper:ftp all - tcp 21
CT:helper:amanda all - udp 10080
CT:helper:RAS all - udp 1719 #H323
CT:helper:sip all - udp 5060
CT:helper:tftp all - udp 69
CT:helper:sane all - tcp 6566
?IF __IPV4
CT:helper:irc all - tcp 6667
CT:helper:netbios-ns all - udp 137
CT:helper:pptp all - tcp 1729
?ENDIF
?ENDIF

View File

@ -1,9 +0,0 @@
#
# Shorewall version 4 - Notrack File
#
# For information about entries in this file, type "man shorewall-notrack"
#
#####################################################################################
FORMAT 2
#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/
# PORT(S) PORT(S) GROUP

View File

@ -634,14 +634,14 @@ if [ -f masq ]; then
fi
fi
#
# Install the Notrack file
# Install the Conntrack file
#
run_install $OWNERSHIP -m 0644 notrack ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles
run_install $OWNERSHIP -m 0644 notrack.annotated ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles
run_install $OWNERSHIP -m 0644 conntrack ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles
run_install $OWNERSHIP -m 0644 conntrack.annotated ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}${CONFDIR}/$PRODUCT/notrack ]; then
run_install $OWNERSHIP -m 0600 notrack${suffix} ${DESTDIR}${CONFDIR}/$PRODUCT/notrack
echo "Notrack file installed as ${DESTDIR}${CONFDIR}/$PRODUCT/notrack"
if [ -z "$SPARSE" -a ! -f ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack ]; then
run_install $OWNERSHIP -m 0600 conntrack${suffix} ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack
echo "Conntrack file installed as ${DESTDIR}${CONFDIR}/$PRODUCT/conntrack"
fi
#

View File

@ -3,33 +3,34 @@
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<refentry>
<refmeta>
<refentrytitle>shorewall6-notrack</refentrytitle>
<refentrytitle>shorewall6-conntrack</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>notrack</refname>
<refname>conntrack</refname>
<refpurpose>shorewall notrack file</refpurpose>
<refpurpose>shorewall conntrack file</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>/etc/shorewall/notrack</command>
<command>/etc/shorewall/conntrack</command>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>The original intent of the notrack file was to exempt certain
traffic from Netfilter connection tracking. Traffic matching entries in
this file were not to be tracked.</para>
<para>The original intent of the <emphasis role="bold">notrack</emphasis>
file was to exempt certain traffic from Netfilter connection tracking.
Traffic matching entries in the file were not to be tracked.</para>
<para>The role of the file was expanded in Shorewall 4.4.27 to include all
rules tht can be added in the Netfilter <emphasis
role="bold">raw</emphasis> table.</para>
rules that can be added in the Netfilter <emphasis
role="bold">raw</emphasis> table. In 4.5.7, the file's name was changed to
<emphasis role="bold">conntrack</emphasis>.</para>
<para>The file supports two different column layouts: FORMAT 1 and FORMAT
2, FORMAT 1 being the default. The two differ in that FORMAT 2 has an
@ -53,63 +54,66 @@
<varlistentry>
<term><emphasis role="bold">ACTION</emphasis> - {<emphasis
role="bold">NOTRACK</emphasis>|<emphasis
role="bold">CT</emphasis>:<replaceable>option</replaceable>[:<replaceable>arg,...</replaceable>]}</term>
role="bold">CT</emphasis>:<emphasis
role="bold">helper</emphasis>:<replaceable>name</replaceable>[(<replaceable>arg</replaceable>=<replaceable>val</replaceable>[,...])|<emphasis
role="bold">CT:notrack</emphasis>}</term>
<listitem>
<para>This column is only present when FORMAT = 2. Values other than
NOTRACK require <firstterm>CT Target </firstterm>support in your
iptables and kernel.</para>
<para>Possible values for <replaceable>option</replaceable> and
<replaceable>arg</replaceable>s are:</para>
<itemizedlist>
<listitem>
<para><option>notrack</option> (no
<replaceable>arg</replaceable>)</para>
<para><option>NOTRACK</option> or
<option>CT:notrack</option></para>
<para>Disables connection tracking for this packet, the same as
if NOTRACK has been specified in this column.</para>
<para>Disables connection tracking for this packet.</para>
</listitem>
<listitem>
<para><option>helper</option>:<replaceable>name</replaceable></para>
<para>Use the helper identified by the name to this connection.
This is more flexible than loading the conntrack helper with
preset ports.</para>
</listitem>
<para>Attach the helper identified by the
<replaceable>name</replaceable> to this connection. This is more
flexible than loading the conntrack helper with preset ports.
May be followed by an option list of
<replaceable>arg</replaceable>=<replaceable>val</replaceable>
pairs in parentheses:</para>
<listitem>
<para><option>ctevents</option>:<replaceable>event</replaceable>,...</para>
<itemizedlist>
<listitem>
<para><option>ctevents</option>=<replaceable>event</replaceable>[,...]</para>
<para>Only generate the specified conntrack events for this
connection. Possible event types are: <emphasis
role="bold">new</emphasis>, <emphasis
role="bold">related</emphasis>, <emphasis
role="bold">destroy</emphasis>, <emphasis
role="bold">reply</emphasis>, <emphasis
role="bold">assured</emphasis>, <emphasis
role="bold">protoinfo</emphasis>, <emphasis
role="bold">helper</emphasis>, <emphasis
role="bold">mark</emphasis> (this is connection mark, not packet
mark), <emphasis role="bold">natseqinfo</emphasis>, and
<emphasis role="bold">secmark</emphasis>.</para>
</listitem>
<para>Only generate the specified conntrack events for this
connection. Possible event types are: <emphasis
role="bold">new</emphasis>, <emphasis
role="bold">related</emphasis>, <emphasis
role="bold">destroy</emphasis>, <emphasis
role="bold">reply</emphasis>, <emphasis
role="bold">assured</emphasis>, <emphasis
role="bold">protoinfo</emphasis>, <emphasis
role="bold">helper</emphasis>, <emphasis
role="bold">mark</emphasis> (this is connection mark, not
packet mark), <emphasis role="bold">natseqinfo</emphasis>,
and <emphasis role="bold">secmark</emphasis>.</para>
</listitem>
<listitem>
<para><option>expevents</option><option>:new</option></para>
<listitem>
<para><option>expevents</option><option>=new</option></para>
<para>Only generate a new expectation events for this
connection.</para>
</listitem>
<para>Only generate a <emphasis role="bold">new</emphasis>
expectation events for this connection.</para>
</listitem>
<listitem>
<para><option>zone</option>:<replaceable>id</replaceable></para>
<listitem>
<para><option>zone</option>=<replaceable>id</replaceable></para>
<para>Assign this packet to zone <replaceable>id</replaceable>
and only have lookups done in that zone. By default, packets
have zone 0.</para>
<para>Assign this packet to Netfilter security zone
<replaceable>id</replaceable> and only have lookups done in
that zone. By default, packets have zone 0.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
@ -225,6 +229,14 @@
</variablelist>
</refsect1>
<refsect1>
<title>EXAMPLE</title>
<programlisting>#ACTION SOURCE DEST PROTO DEST SOURCE USER/GROUP
# PORT(S) PORT(S)
CT:helper:ftp(expevents=new) fw - tcp 21 </programlisting>
</refsect1>
<refsect1>
<title>FILES</title>

View File

@ -0,0 +1,22 @@
#
# Shorewall version 4 - conntrack File
#
# For information about entries in this file, type "man shorewall6-conntrack"
#
#############################################################################################
FORMAT 2
#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/
# PORT(S) PORT(S) GROUP
?IF $AUTOHELPERS && __CT_TARGET
CT:helper:ftp all - tcp 21
CT:helper:amanda all - udp 10080
CT:helper:RAS all - udp 1719 #H323
CT:helper:sip all - udp 5060
CT:helper:tftp all - udp 69
CT:helper:sane all - tcp 6566
?IF __IPV4
CT:helper:irc all - tcp 6667
CT:helper:netbios-ns all - udp 137
CT:helper:pptp all - tcp 1729
?ENDIF
?ENDIF

View File

@ -1,9 +0,0 @@
#
# Shorewall version 4 - Notrack File
#
# For information about entries in this file, type "man shorewall-notrack"
#
#####################################################################################
FORMAT 2
#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/
# PORT(S) PORT(S) GROUP

View File

@ -109,7 +109,9 @@ ACCOUNTING_TABLE=filter
ADMINISABSENTMINDED=Yes
AUTO_COMMENT=Yes
AUTOCOMMENT=Yes
AUTOHELPERS=Yes
AUTOMAKE=No

View File

@ -3,33 +3,34 @@
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<refentry>
<refmeta>
<refentrytitle>shorewall6-notrack</refentrytitle>
<refentrytitle>shorewall6-conntrack</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>notrack</refname>
<refname>conntrack</refname>
<refpurpose>shorewall6 notrack file</refpurpose>
<refpurpose>shorewall6 conntrack file</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>/etc/shorewall6/notrack</command>
<command>/etc/shorewall6/conntrack</command>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>The original intent of the notrack file was to exempt certain
traffic from Netfilter connection tracking. Traffic matching entries in
this file were not to be tracked.</para>
<para>The original intent of the <emphasis role="bold">notrack</emphasis>
file was to exempt certain traffic from Netfilter connection tracking.
Traffic matching entries in that file were not to be tracked.</para>
<para>The role of the file was expanded in Shorewall 4.4.27 to include all
rules tht can be added in the Netfilter <emphasis
role="bold">raw</emphasis> table.</para>
rules that can be added in the Netfilter <emphasis
role="bold">raw</emphasis> table. In 4.5.7, the file's name was changed to
<emphasis role="bold">conntrack</emphasis>.</para>
<para>The file supports two different column layouts: FORMAT 1 and FORMAT
2, FORMAT 1 being the default. The two differ in that FORMAT 2 has an
@ -52,63 +53,66 @@
<varlistentry>
<term><emphasis role="bold">ACTION</emphasis> - {<emphasis
role="bold">NOTRACK</emphasis>|<emphasis
role="bold">CT</emphasis>:<replaceable>option</replaceable>:<replaceable>args</replaceable>}</term>
role="bold">CT</emphasis>:<emphasis
role="bold">helper</emphasis>:<replaceable>name</replaceable>[(<replaceable>arg</replaceable>=<replaceable>val</replaceable>[,...])|<emphasis
role="bold">CT:notrack</emphasis>}</term>
<listitem>
<para>This column is only present when FORMAT = 2. Values other than
NOTRACK require <firstterm>CT Target </firstterm>support in your
iptables and kernel.</para>
<para>Possible values for <replaceable>option</replaceable> and
<replaceable>arg</replaceable>s are:</para>
<itemizedlist>
<listitem>
<para><option>notrack</option> (no
<replaceable>arg</replaceable>)</para>
<para><option>NOTRACK</option> or
<option>CT:notrack</option></para>
<para>Disables connection tracking for this packet, the same as
if NOTRACK has been specified in this column.</para>
<para>Disables connection tracking for this packet.</para>
</listitem>
<listitem>
<para><option>helper</option>:<replaceable>name</replaceable></para>
<para>Use the helper identified by the name to this connection.
This is more flexible than loading the conntrack helper with
preset ports.</para>
</listitem>
<para>Attach the helper identified by the
<replaceable>name</replaceable> to this connection. This is more
flexible than loading the conntrack helper with preset ports.
May be followed by an option list of
<replaceable>arg</replaceable>=<replaceable>val</replaceable>
pairs in parentheses:</para>
<listitem>
<para><option>ctevents</option>:<replaceable>event</replaceable>,...</para>
<itemizedlist>
<listitem>
<para><option>ctevents</option>=<replaceable>event</replaceable>[,...]</para>
<para>Only generate the specified conntrack events for this
connection. Possible event types are: <emphasis
role="bold">new</emphasis>, <emphasis
role="bold">related</emphasis>, <emphasis
role="bold">destroy</emphasis>, <emphasis
role="bold">reply</emphasis>, <emphasis
role="bold">assured</emphasis>, <emphasis
role="bold">protoinfo</emphasis>, <emphasis
role="bold">helper</emphasis>, <emphasis
role="bold">mark</emphasis> (this is connection mark, not packet
mark), <emphasis role="bold">natseqinfo</emphasis>, and
<emphasis role="bold">secmark</emphasis>.</para>
</listitem>
<para>Only generate the specified conntrack events for this
connection. Possible event types are: <emphasis
role="bold">new</emphasis>, <emphasis
role="bold">related</emphasis>, <emphasis
role="bold">destroy</emphasis>, <emphasis
role="bold">reply</emphasis>, <emphasis
role="bold">assured</emphasis>, <emphasis
role="bold">protoinfo</emphasis>, <emphasis
role="bold">helper</emphasis>, <emphasis
role="bold">mark</emphasis> (this is connection mark, not
packet mark), <emphasis role="bold">natseqinfo</emphasis>,
and <emphasis role="bold">secmark</emphasis>.</para>
</listitem>
<listitem>
<para><option>expevents</option><option>:new</option></para>
<listitem>
<para><option>expevents</option><option>=new</option></para>
<para>Only generate a new expectation events for this
connection.</para>
</listitem>
<para>Only generate a <emphasis role="bold">new</emphasis>
expectation events for this connection.</para>
</listitem>
<listitem>
<para><option>zone</option>:<replaceable>id</replaceable></para>
<listitem>
<para><option>zone</option>=<replaceable>id</replaceable></para>
<para>Assign this packet to zone <replaceable>id</replaceable>
and only have lookups done in that zone. By default, packets
have zone 0.</para>
<para>Assign this packet to Netfilter security zone
<replaceable>id</replaceable> and only have lookups done in
that zone. By default, packets have zone 0.</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
@ -207,6 +211,14 @@
</variablelist>
</refsect1>
<refsect1>
<title>EXAMPLE</title>
<programlisting>#ACTION SOURCE DEST PROTO DEST SOURCE USER/GROUP
# PORT(S) PORT(S)
CT:helper:ftp(expevents=new) fw - tcp 21 </programlisting>
</refsect1>
<refsect1>
<title>FILES</title>
@ -223,9 +235,9 @@
shorewall6-blacklist(5), shorewall6-hosts(5), shorewall6-interfaces(5),
shorewall6-ipsec(5), shoewall6-netmap(5),shorewall6-params(5),
shorewall6-policy(5), shorewall6-providers(5), shorewall6-proxyarp(5),
shorewall6-rtrules(5), shorewall6-routestopped(5),
shorewall6-rules(5), shorewall6.conf(5), shorewall6-secmarks(5),
shorewall6-tcclasses(5), shorewall6-tcdevices(5), shorewall6-tcrules(5),
shorewall6-tos(5), shorewall6-tunnels(5), shorewall-zones(5)</para>
shorewall6-rtrules(5), shorewall6-routestopped(5), shorewall6-rules(5),
shorewall6.conf(5), shorewall6-secmarks(5), shorewall6-tcclasses(5),
shorewall6-tcdevices(5), shorewall6-tcrules(5), shorewall6-tos(5),
shorewall6-tunnels(5), shorewall-zones(5)</para>
</refsect1>
</refentry>