2006-11-16 18:00:57 +01:00
<?xml version="1.0" encoding="UTF-8"?>
2008-11-19 18:20:40 +01:00
< !DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
2006-11-16 18:00:57 +01:00
<refentry >
<refmeta >
<refentrytitle > shorewall</refentrytitle>
<manvolnum > 8</manvolnum>
</refmeta>
<refnamediv >
<refname > shorewall</refname>
<refpurpose > Administration tool for Shoreline Firewall
(Shorewall)</refpurpose>
</refnamediv>
<refsynopsisdiv >
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg rep= "norepeat" > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > add</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain"
rep="repeat"><replaceable > interface</replaceable> [:<replaceable > host-list</replaceable> ]</arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > zone</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > allow</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > address</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > check</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -e</option> </arg>
2007-05-09 22:41:39 +02:00
<arg > <option > -d</option> </arg>
<arg > <option > -p</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <replaceable > directory</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-08-15 18:42:01 +02:00
<arg
choice="plain"><option > clear</option> <arg > <option > -f</option> </arg> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > compile</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -e</option> </arg>
2007-05-09 22:41:39 +02:00
<arg > <option > -d</option> </arg>
<arg > <option > -p</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <replaceable > directory</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2009-04-02 03:12:34 +02:00
<arg choice= "opt" > <replaceable > pathname</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg rep= "norepeat" > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > delete</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain"
rep="repeat"><replaceable > interface</replaceable> [:<replaceable > host-list</replaceable> ]</arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > zone</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > drop</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > address</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > dump</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -x</option> </arg>
2006-11-16 22:21:03 +01:00
<arg > <option > -m</option> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2009-04-02 03:12:34 +02:00
<arg choice= "plain" > <option > export</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "opt" > <replaceable > directory1</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg
choice="plain">[<replaceable > user</replaceable> @]<replaceable > system</replaceable> [<option > :</option> <replaceable > directory2</replaceable> ]</arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > forget</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg > <replaceable > filename</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > help</option> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-11-10 21:59:24 +01:00
<arg
choice="plain"><option > hits</option> <arg > <option > -t</option> </arg> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > ipcalc</option> </arg>
2006-11-16 18:00:57 +01:00
2006-11-16 22:21:03 +01:00
<group choice= "req" >
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > address</replaceable>
<replaceable > mask</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg
choice="plain"><replaceable > address</replaceable> /<replaceable > vlsm</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</group>
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > iprange</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg
choice="plain"><replaceable > address1</replaceable> <option > -</option> <replaceable > address2</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
2009-06-17 21:03:05 +02:00
<cmdsynopsis >
<command > shorewall</command>
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
<arg > -<replaceable > options</replaceable> </arg>
<arg choice= "plain" > <option > iptrace</option> </arg>
<arg choice= "plain" > <replaceable > iptables match
expression</replaceable> </arg>
</cmdsynopsis>
2006-11-16 18:00:57 +01:00
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > load</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -s</option> </arg>
<arg > <option > -c</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <option > -r</option> <replaceable > root-user-name</replaceable> </arg>
2006-12-11 19:53:58 +01:00
2007-01-14 22:06:05 +01:00
<arg > <replaceable > directory</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > system</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > logdrop</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > address</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > logwatch</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -m</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <replaceable > refresh-interval</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > logreject</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > address</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
2009-06-17 21:03:05 +02:00
<cmdsynopsis >
<command > shorewall</command>
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
<arg > -<replaceable > options</replaceable> </arg>
<arg choice= "plain" > <option > noiptrace</option> </arg>
<arg choice= "plain" > <replaceable > iptables match
expression</replaceable> </arg>
</cmdsynopsis>
2006-11-16 18:00:57 +01:00
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-08-26 23:52:57 +02:00
<arg choice= "plain" > <option > refresh</option> <arg
rep="repeat"><replaceable > chain</replaceable> </arg> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > reject</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > address</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > reload</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -s</option> </arg>
<arg > <option > -c</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <option > -r</option> <replaceable > root-user-name</replaceable> </arg>
2006-12-11 19:53:58 +01:00
2007-01-14 22:06:05 +01:00
<arg > <replaceable > directory</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > system</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
2007-08-15 18:42:01 +02:00
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-08-15 18:42:01 +02:00
<arg > -<replaceable > options</replaceable> </arg>
2007-08-15 18:59:22 +02:00
<arg choice= "plain" > <option > reset</option> </arg>
2007-08-15 18:42:01 +02:00
</cmdsynopsis>
2006-11-16 18:00:57 +01:00
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > restart</option> </arg>
2006-11-16 18:00:57 +01:00
2008-03-24 21:07:15 +01:00
<arg > <option > -n</option> </arg>
2008-04-28 19:32:31 +02:00
<arg > <option > -p</option> </arg>
2008-07-06 23:47:59 +02:00
<arg > <option > -f</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <replaceable > directory</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > restore</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg > <replaceable > filename</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > safe-restart</option> </arg>
2006-12-03 19:42:14 +01:00
2007-05-09 22:41:39 +02:00
<arg > <option > -d</option> </arg>
<arg > <option > -p</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <replaceable > directory</replaceable> </arg>
2006-11-16 22:21:03 +01:00
</cmdsynopsis>
2006-11-16 18:00:57 +01:00
2006-11-16 22:21:03 +01:00
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 22:21:03 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > safe-start</option> </arg>
2006-12-03 19:42:14 +01:00
2007-05-09 22:41:39 +02:00
<arg > <option > -d</option> </arg>
<arg > <option > -p</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <replaceable > directory</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > save</option> </arg>
2006-11-16 18:00:57 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "opt" > <replaceable > filename</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > show</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -x</option> </arg>
2006-12-02 17:55:39 +01:00
<arg > <option > -t</option>
{<option > filter</option> |<option > mangle</option> |<option > nat</option> |<option > raw</option> }</arg>
2007-06-28 20:21:28 +02:00
<arg > <arg > <option > chain</option> </arg> <arg choice= "plain"
rep="repeat"><replaceable > chain</replaceable> </arg> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > show</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -f</option> </arg>
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > capabilities</option> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > show</option> </arg>
2006-11-16 18:00:57 +01:00
2006-11-17 16:47:07 +01:00
<arg
2008-03-19 21:43:43 +01:00
choice="req"><option > actions|classifiers|connections|config|filters|macros|zones</option> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > show</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -x</option> </arg>
2009-02-16 20:14:37 +01:00
<arg choice= "req" > <option > mangle|nat|raw</option> </arg>
2006-11-17 16:47:07 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-17 16:47:07 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > show</option> </arg>
2006-11-17 16:47:07 +01:00
<arg choice= "plain" > <option > tc</option> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > show</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -m</option> </arg>
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > log</option> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > start</option> </arg>
2006-11-16 18:00:57 +01:00
2008-03-24 21:07:15 +01:00
<arg > <option > -n</option> </arg>
2006-11-16 18:00:57 +01:00
<arg > <option > -f</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > <replaceable > directory</replaceable> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-08-15 18:42:01 +02:00
<arg
choice="plain"><option > stop</option> <arg > <option > -f</option> </arg> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > status</option> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
2006-12-03 19:42:14 +01:00
<cmdsynopsis >
<command > shorewall</command>
2008-04-10 16:55:08 +02:00
<arg
choice="opt"><option > trace</option> |<option > debug</option> <arg > <option > nolock</option> </arg> </arg>
2007-10-06 18:50:27 +02:00
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-12-03 19:42:14 +01:00
2007-01-13 19:33:38 +01:00
<arg choice= "plain" > <option > try</option> </arg>
2006-12-03 19:42:14 +01:00
2007-01-14 22:06:05 +01:00
<arg choice= "plain" > <replaceable > directory</replaceable> </arg>
2006-12-03 19:42:14 +01:00
2007-01-14 22:06:05 +01:00
<arg > <replaceable > timeout</replaceable> </arg>
2006-12-03 19:42:14 +01:00
</cmdsynopsis>
2006-11-16 18:00:57 +01:00
<cmdsynopsis >
<command > shorewall</command>
2007-10-06 18:50:27 +02:00
<arg choice= "opt" > <option > trace</option> |<option > debug</option> </arg>
2007-01-14 22:06:05 +01:00
<arg > -<replaceable > options</replaceable> </arg>
2006-11-16 18:00:57 +01:00
2007-06-16 17:30:19 +02:00
<arg
choice="plain"><option > version</option> <arg > <option > -a</option> </arg> </arg>
2006-11-16 18:00:57 +01:00
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 >
<title > Description</title>
<para > The shorewall utility is used to control the Shoreline Firewall
(Shorewall).</para>
</refsect1>
<refsect1 >
<title > Options</title>
2007-10-06 18:50:27 +02:00
<para > The <option > trace</option> and <option > debug</option> options are
used for debugging. See <ulink
url="http://www.shorewall.net/starting_and_stopping.htm#Trace">http://www.shorewall.net/starting_and_stopping.htm#Trace</ulink> .</para>
2008-04-10 16:55:08 +02:00
<para > The nolock <option > option</option> prevents the command from
attempting to acquire the Shorewall lockfile. It is useful if you need to
include <command > shorewall</command> commands in
<filename > /etc/shorewall/started</filename> .</para>
2006-11-16 18:00:57 +01:00
<para > The <emphasis > options</emphasis> control the amount of output that
the command produces. They consist of a sequence of the letters <emphasis
role="bold">v</emphasis> and <emphasis role= "bold" > q</emphasis> . If the
options are omitted, the amount of output is determined by the setting of
2007-01-14 23:34:51 +01:00
the VERBOSITY parameter in <ulink
url="shorewall.conf.html">shorewall.conf</ulink> (5). Each <emphasis
2006-11-16 18:00:57 +01:00
role="bold">v</emphasis> adds one to the effective verbosity and each
<emphasis role= "bold" > q</emphasis> subtracts one from the effective
2007-11-23 22:49:06 +01:00
VERBOSITY. Anternately, <emphasis role= "bold" > v</emphasis> may be followed
immediately with one of -1,0,1,2 to specify a specify VERBOSITY. There may
be no white space between <emphasis role= "bold" > v</emphasis> and the
2006-11-16 18:00:57 +01:00
VERBOSITY.</para>
2007-02-09 17:32:32 +01:00
<para > The <emphasis > options</emphasis> may also include the letter
<option > t</option> which causes all progress messages to be
timestamped.</para>
2006-11-16 18:00:57 +01:00
</refsect1>
<refsect1 >
<title > Commands</title>
2006-11-16 22:21:03 +01:00
<para > The available commands are listed below.</para>
2006-11-16 18:00:57 +01:00
<variablelist >
<varlistentry >
2006-11-16 22:21:03 +01:00
<term > <emphasis role= "bold" > add</emphasis> </term>
2006-11-16 18:00:57 +01:00
<listitem >
<para > Adds a list of hosts or subnets to a dynamic zone usually used
with VPN's.</para>
2006-11-16 22:21:03 +01:00
<para > The <emphasis > interface</emphasis> argument names an interface
2007-01-14 23:34:51 +01:00
defined in the <ulink
url="shorewall-interfaces.html">shorewall-interfaces</ulink> (5)
file. A <emphasis > host-list</emphasis> is comma-separated list whose
2007-08-15 18:59:22 +02:00
elements are host or network addresses.<caution >
2007-06-27 16:47:58 +02:00
<para > The <command > add</command> command is not very robust. If
there are errors in the <replaceable > host-list</replaceable> ,
you may see a large number of error messages yet a subsequent
<command > shorewall show zones</command> command will indicate
that all hosts were added. If this happens, replace
<command > add</command> by <command > delete</command> and run the
same command again. Then enter the correct command.</para>
</caution> </para>
2006-11-16 18:00:57 +01:00
</listitem>
</varlistentry>
<varlistentry >
2006-11-16 22:21:03 +01:00
<term > <emphasis role= "bold" > allow</emphasis> </term>
2006-11-16 18:00:57 +01:00
<listitem >
<para > Re-enables receipt of packets from hosts previously
blacklisted by a <emphasis role= "bold" > drop</emphasis> , <emphasis
role="bold">logdrop</emphasis> , <emphasis
role="bold">reject</emphasis> , or <emphasis
role="bold">logreject</emphasis> command.</para>
</listitem>
</varlistentry>
<varlistentry >
2006-11-16 22:21:03 +01:00
<term > <emphasis role= "bold" > check</emphasis> </term>
2006-11-16 18:00:57 +01:00
<listitem >
<para > Compiles the configuraton in the specified
<emphasis > directory</emphasis> and discards the compiled output
script. If no <emphasis > directory</emphasis> is given, then
/etc/shorewall is assumed.</para>
<para > The <emphasis role= "bold" > -e</emphasis> option causes the
compiler to look for a file named capabilities. This file is
produced using the command <emphasis role= "bold" > shorewall-lite show
2007-05-16 18:43:33 +02:00
-f capabilities > capabilities</emphasis> on a system with
2006-11-16 18:00:57 +01:00
Shorewall Lite installed.</para>
2007-05-09 22:41:39 +02:00
2009-07-15 22:47:16 +02:00
<para > The <option > -d</option> option causes the compiler to be run
under control of the Perl debugger.</para>
2007-05-09 22:41:39 +02:00
2009-07-15 22:47:16 +02:00
<para > The <option > -p</option> option causes the compiler to be
profiled via the Perl <option > -wd:DProf</option> command-line
option.</para>
2006-11-16 18:00:57 +01:00
</listitem>
</varlistentry>
<varlistentry >
2006-11-16 22:21:03 +01:00
<term > <emphasis role= "bold" > clear</emphasis> </term>
2006-11-16 18:00:57 +01:00
<listitem >
<para > Clear will remove all rules and chains installed by Shorewall.
The firewall is then wide open and unprotected. Existing connections
are untouched. Clear is often used to see if the firewall is causing
connection problems.</para>
2007-08-15 18:42:01 +02:00
2009-07-16 02:50:55 +02:00
<para > If <option > -f</option> is given, the command will be processed
by the compiled script that executed the last successful <emphasis
2007-08-16 18:08:53 +02:00
role="bold">start</emphasis> , <emphasis
2007-08-15 18:42:01 +02:00
role="bold">restart</emphasis> or <emphasis
role="bold">refresh</emphasis> command if that script exists.</para>
2006-11-16 18:00:57 +01:00
</listitem>
</varlistentry>
<varlistentry >
2006-11-16 22:21:03 +01:00
<term > <emphasis role= "bold" > compile</emphasis> </term>
<listitem >
<para > Compiles the current configuration into the executable file
<emphasis > pathname</emphasis> . If a directory is supplied, Shorewall
2009-04-02 03:12:34 +02:00
will look in that directory first for configuration files. If the
<emphasis > pathname</emphasis> is omitted, the file
<filename > firewall</filename> in the VARDIR (normally <filename
2009-05-01 20:38:52 +02:00
class="directory">/var/lib/shorewall/</filename> ) is assumed. A
<emphasis > pathname</emphasis> of '-' causes the compiler to send the
generated script to it's standard output file. Note that '-v-1' is
usually specified in this case (e.g., <command > shorewall -v-1
compile -- -</command> ) to suppress the 'Compiling...' message
normally generated by <filename > /sbin/shorewall</filename> .</para>
2006-11-16 22:21:03 +01:00
<para > When -e is specified, the compilation is being performed on a
system other than where the compiled script will run. This option
disables certain configuration options that require the script to be
compiled where it is to be run. The use of -e requires the presense
2006-12-02 18:11:33 +01:00
of a configuration file named <filename > capabilities</filename>
which may be produced using the command <emphasis
role="bold">shorewall-lite show -f capabilities >
2007-05-16 18:43:33 +02:00
capabilities</emphasis> on a system with Shorewall Lite
2006-12-02 18:11:33 +01:00
installed</para>
2007-05-09 22:41:39 +02:00
2009-07-16 02:50:55 +02:00
<para > The <option > -d</option> option causes the compiler to be run
under control of the Perl debugger.</para>
2007-05-09 22:41:39 +02:00
2009-07-15 22:47:16 +02:00
<para > The <option > -p</option> option causes the compiler to be
profiled via the Perl <option > -wd:DProf</option> command-line
option.</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > delete</emphasis> </term>
<listitem >
<para > The delete command reverses the effect of an earlier <emphasis
role="bold">add</emphasis> command.</para>
2006-11-17 16:47:07 +01:00
<para > The <emphasis > interface</emphasis> argument names an interface
2007-01-14 23:34:51 +01:00
defined in the <ulink
url="shorewall-interfaces.html">shorewall-interfaces</ulink> (5)
file. A <emphasis > host-list</emphasis> is comma-separated list whose
2007-06-25 19:02:46 +02:00
elements are a host or network address.</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > drop</emphasis> </term>
<listitem >
<para > Causes traffic from the listed <emphasis > address</emphasis> es
to be silently dropped.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > dump</emphasis> </term>
<listitem >
<para > Produces a verbose report about the firewall configuration for
the purpose of problem analysis.</para>
<para > The <emphasis role= "bold" > -x</emphasis> option causes actual
packet and byte counts to be displayed. Without that option, these
counts are abbreviated. The <emphasis role= "bold" > -m</emphasis>
option causes any MAC addresses included in Shorewall log messages
to be displayed.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > export</emphasis> </term>
<listitem >
<para > If <emphasis > directory1</emphasis> is omitted, the current
2006-11-17 16:47:07 +01:00
working directory is assumed.</para>
2006-11-16 22:21:03 +01:00
<para > Allows a non-root user to compile a shorewall script and stage
it on a system (provided that the user has access to the system via
ssh). The command is equivalent to:</para>
<programlisting > <emphasis role= "bold" > /sbin/shorewall compile -e</emphasis> <emphasis > directory1</emphasis> <emphasis > directory1</emphasis> <emphasis
role="bold">/firewall & & \</emphasis>
<emphasis role= "bold" > scp</emphasis> directory1<emphasis role= "bold" > /firewall</emphasis> <emphasis > directory1</emphasis> <emphasis
role="bold">/firewall.conf</emphasis> [<emphasis > user</emphasis> @]<emphasis
role="bold">system</emphasis> :[<emphasis > directory2</emphasis> ]</programlisting>
<para > In other words, the configuration in the specified (or
defaulted) directory is compiled to a file called firewall in that
directory. If compilation succeeds, then firewall and firewall.conf
are copied to <emphasis > system</emphasis> using scp.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > forget</emphasis> </term>
<listitem >
<para > Deletes /var/lib/shorewall/<emphasis > filenam</emphasis> e and
/var/lib/shorewall/save. If no <emphasis > filename</emphasis> is
2007-01-14 23:34:51 +01:00
given then the file specified by RESTOREFILE in <ulink
url="shorewall.conf.html">shorewall.conf</ulink> (5) is
2006-11-16 22:21:03 +01:00
assumed.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > help</emphasis> </term>
<listitem >
2006-11-21 23:52:07 +01:00
<para > Displays a syntax summary.</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > hits</emphasis> </term>
<listitem >
<para > Generates several reports from Shorewall log messages in the
2007-11-10 21:59:24 +01:00
current log file. If the <option > -t</option> option is included, the
reports are restricted to log messages generated today.</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > ipcalc</emphasis> </term>
<listitem >
<para > Ipcalc displays the network address, broadcast address,
network in CIDR notation and netmask corresponding to the
input[s].</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > iprange</emphasis> </term>
<listitem >
<para > Iprange decomposes the specified range of IP addresses into
the equivalent list of network/host addresses.</para>
</listitem>
</varlistentry>
2009-06-17 21:03:05 +02:00
<varlistentry >
<term > <emphasis role= "bold" > iptrace</emphasis> </term>
<listitem >
<para > This is a low-level debugging command that causes iptables
TRACE log records to be created. See iptables(8) for details.</para>
<para > The <replaceable > iptables match expression</replaceable> must
be one or more matches that may appear in both the raw table OUTPUT
and raw table PREROUTING chains.</para>
2009-06-18 01:46:20 +02:00
<para > The trace records are written to the kernel's log buffer with
faciility = kernel and priority = warning, and they are routed from
there by your logging daemon (syslogd, rsyslog, syslog-ng, ...) --
Shorewall has no control over where the messages go; consult your
logging daemon's documentation.</para>
2009-06-17 21:03:05 +02:00
</listitem>
</varlistentry>
2006-11-16 22:21:03 +01:00
<varlistentry >
<term > <emphasis role= "bold" > load</emphasis> </term>
<listitem >
<para > If <emphasis > directory</emphasis> is omitted, the current
working directory is assumed. Allows a non-root user to compile a
shorewall script and install it on a system (provided that the user
has root access to the system via ssh). The command is equivalent
to:</para>
2006-12-02 23:45:56 +01:00
<programlisting > <emphasis role= "bold" > /sbin/shorewall compile -e</emphasis> <emphasis > <replaceable > directory</replaceable> </emphasis> <replaceable > directory</replaceable> <emphasis
2006-11-16 22:21:03 +01:00
role="bold">/firewall & & \</emphasis>
<emphasis role= "bold" > scp</emphasis> <emphasis > directory</emphasis> <emphasis
role="bold">/firewall</emphasis> <emphasis > directory</emphasis> <emphasis
2006-12-02 23:45:56 +01:00
role="bold">/firewall.conf</emphasis> <emphasis role= "bold" > root@</emphasis> <replaceable > system</replaceable> <emphasis
2006-11-16 22:21:03 +01:00
role="bold">:/var/lib/shorewall-lite/ & & \</emphasis>
2006-12-02 23:45:56 +01:00
<emphasis role= "bold" > ssh root@</emphasis> <replaceable > system</replaceable> <emphasis
2006-11-16 22:21:03 +01:00
role="bold">'/sbin/shorewall-lite start'</emphasis> </programlisting>
<para > In other words, the configuration in the specified (or
defaulted) directory is compiled to a file called firewall in that
directory. If compilation succeeds, then firewall is copied to
2006-12-02 23:45:56 +01:00
<replaceable > system</replaceable> using scp. If the copy succeeds,
Shorewall Lite on <replaceable > system</replaceable> is started via
2006-11-16 22:21:03 +01:00
ssh.</para>
<para > If <emphasis role= "bold" > -s</emphasis> is specified and the
<emphasis role= "bold" > start</emphasis> command succeeds, then the
remote Shorewall-lite configuration is saved by executing <emphasis
role="bold">shorewall-lite save</emphasis> via ssh.</para>
<para > if <emphasis role= "bold" > -c</emphasis> is included, the
command <emphasis role= "bold" > shorewall-lite show capabilities -f
> /var/lib/shorewall-lite/capabilities</emphasis> is executed via
ssh then the generated file is copied to
2006-12-02 23:45:56 +01:00
<replaceable > directory</replaceable> using scp. This step is
performed before the configuration is compiled.</para>
2006-12-11 19:53:58 +01:00
<para > If <option > -r</option> is included, it specifies that the root
user on <replaceable > system</replaceable> is named
<replaceable > root-user-name</replaceable> rather than "root".</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > logdrop</emphasis> </term>
<listitem >
<para > Causes traffic from the listed <emphasis > address</emphasis> es
2009-01-24 17:36:43 +01:00
to be logged then discarded. Logging occurs at the log level
specified by the BLACKLIST_LOGLEVEL setting in <ulink
url="shorewall.conf.html">shorewall.conf</ulink> (5).</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > logwatch</emphasis> </term>
<listitem >
2007-04-15 19:19:22 +02:00
<para > Monitors the log file specified by the LOGFILE option in
<ulink url= "shorewall.conf.html" > shorewall.conf</ulink> (5) and
produces an audible alarm when new Shorewall messages are logged.
The <emphasis role= "bold" > -m</emphasis> option causes the MAC
address of each packet source to be displayed if that information is
2007-12-01 18:27:20 +01:00
available. The <replaceable > refresh-interval</replaceable> specifies
the time in seconds between screen refreshes. You can enter a
negative number by preceding the number with "--" (e.g.,
<command > shorewall logwatch -- -30</command> ). In this case, when a
packet count changes, you will be prompted to hit any key to resume
screen refreshes.</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > logreject</emphasis> </term>
<listitem >
<para > Causes traffic from the listed <emphasis > address</emphasis> es
2009-01-24 17:36:43 +01:00
to be logged then rejected. Logging occurs at the log level
specified by the BLACKLIST_LOGLEVEL setting in <ulink
url="shorewall.conf.html">shorewall.conf</ulink> (5).</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
2009-06-17 21:03:05 +02:00
<varlistentry >
<term > <emphasis role= "bold" > noiptrace</emphasis> </term>
<listitem >
<para > This is a low-level debugging command that cancels a trace
started by a preceding <command > iptrace</command> command.</para>
<para > The <replaceable > iptables match expression</replaceable> must
be one given in the <command > iptrace</command> command being
cancelled.</para>
</listitem>
</varlistentry>
2006-11-16 22:21:03 +01:00
<varlistentry >
<term > <emphasis role= "bold" > refresh</emphasis> </term>
<listitem >
2009-07-15 22:47:16 +02:00
<para > All steps performed by <command > restart</command> are
performed by <command > refresh</command> with the exception that
2007-08-26 23:52:57 +02:00
<command > refresh</command> only recreates the chains specified in
the command while <command > restart</command> recreates the entire
Netfilter ruleset. If no <replaceable > chain</replaceable> is given,
the static blacklisting chain <emphasis
2007-09-10 17:38:01 +02:00
role="bold">blacklst</emphasis> is assumed.</para>
2007-08-30 19:25:24 +02:00
<para > The listed chains are assumed to be in the filter table. You
2007-08-28 16:04:09 +02:00
can refresh chains in other tables by prefixing the chain name with
the table name followed by ":" (e.g., nat:net_dnat). Chain names
which follow are assumed to be in that table until the end of the
2007-11-18 17:16:53 +01:00
list or until an entry in the list names another table. Built-in
chains such as FORWARD may not be refreshed.</para>
2007-08-28 16:04:09 +02:00
<para > Example:<programlisting > <command > shorewall refresh net2fw nat:net_dnat</command> #Refresh the 'net2loc' chain in the filter table and the 'net_dnat' chain in the nat table</programlisting> </para>
2008-02-10 07:00:33 +01:00
2009-07-16 02:50:55 +02:00
<para > The <emphasis role= "bold" > refresh</emphasis> command has
slightly different behavior. When no chain name is given to the
<emphasis role= "bold" > refresh</emphasis> command, the mangle table
is refreshed along with the blacklist chain (if any). This allows
you to modify <filename > /etc/shorewall/tcrules </filename> and
install the changes using <emphasis
role="bold">refresh</emphasis> .</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > reload</emphasis> </term>
<listitem >
<para > If <emphasis > directory</emphasis> is omitted, the current
working directory is assumed. Allows a non-root user to compile a
shorewall script and install it on a system (provided that the user
has root access to the system via ssh). The command is equivalent
to:</para>
<programlisting > <emphasis role= "bold" > /sbin/shorewall compile -e</emphasis> <emphasis > directory</emphasis> <emphasis > directory</emphasis> <emphasis
role="bold">/firewall & & \</emphasis>
<emphasis role= "bold" > scp</emphasis> <emphasis > directory</emphasis> <emphasis
role="bold">/firewall</emphasis> <emphasis > directory</emphasis> <emphasis
role="bold">/firewall.conf</emphasis> <emphasis role= "bold" > root@</emphasis> <emphasis > system</emphasis> <emphasis
role="bold">:/var/lib/shorewall-lite/ & & \</emphasis>
<emphasis role= "bold" > ssh root@</emphasis> <emphasis > system</emphasis> <emphasis
role="bold">'/sbin/shorewall-lite restart'</emphasis> </programlisting>
<para > In other words, the configuration in the specified (or
defaulted) directory is compiled to a file called firewall in that
directory. If compilation succeeds, then firewall is copied to
<emphasis > system</emphasis> using scp. If the copy succeeds,
Shorewall Lite on <emphasis > system</emphasis> is restarted via
ssh.</para>
<para > If <emphasis role= "bold" > -s</emphasis> is specified and the
<emphasis role= "bold" > restart</emphasis> command succeeds, then the
remote Shorewall-lite configuration is saved by executing <emphasis
role="bold">shorewall-lite save</emphasis> via ssh.</para>
<para > if <emphasis role= "bold" > -c</emphasis> is included, the
command <emphasis role= "bold" > shorewall-lite show capabilities -f
> /var/lib/shorewall-lite/capabilities</emphasis> is executed via
ssh then the generated file is copied to
<emphasis > directory</emphasis> using scp. This step is performed
before the configuration is compiled.</para>
2006-12-11 19:53:58 +01:00
<para > If <option > -r</option> is included, it specifies that the root
user on <replaceable > system</replaceable> is named
<replaceable > root-user-name</replaceable> rather than "root".</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > reset</emphasis> </term>
<listitem >
<para > All the packet and byte counters in the firewall are
reset.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > restart</emphasis> </term>
<listitem >
<para > Restart is similar to <emphasis role= "bold" > shorewall
2008-12-18 18:48:31 +01:00
start</emphasis> except that it assumes that the firewall is already
started. Existing connections are maintained. If a
2006-11-16 22:21:03 +01:00
<emphasis > directory</emphasis> is included in the command, Shorewall
will look in that <emphasis > directory</emphasis> first for
configuration files.</para>
2007-05-09 22:41:39 +02:00
2008-03-24 21:07:15 +01:00
<para > The <option > -n</option> option causes Shorewall to avoid
updating the routing table(s).</para>
2008-04-28 19:32:31 +02:00
<para > The <option > -p</option> option causes the connection tracking
table to be flushed; the <command > conntrack</command> utility must
be installed to use this option.</para>
2008-07-06 23:47:59 +02:00
<para > The <option > -f</option> option suppresses the compilation step
and simply reused the compiled script which last started/restarted
2008-11-19 18:20:40 +01:00
Shorewall.</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > restore</emphasis> </term>
<listitem >
<para > Restore Shorewall to a state saved using the <emphasis
role="bold">shorewall save</emphasis> command. Existing connections
are maintained. The <emphasis > filename</emphasis> names a restore
file in /var/lib/shorewall created using <emphasis
role="bold">shorewall save</emphasis> ; if no
<emphasis > filename</emphasis> is given then Shorewall will be
2007-01-14 23:34:51 +01:00
restored from the file specified by the RESTOREFILE option in <ulink
url="shorewall.conf.html">shorewall.conf</ulink> (5).</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > safe-restart</emphasis> </term>
<listitem >
<para > Only allowed if Shorewall is running. The current
configuration is saved in /var/lib/shorewall/safe-restart (see the
save command below) then a <emphasis role= "bold" > shorewall
restart</emphasis> is done. You will then be prompted asking if you
want to accept the new configuration or not. If you answer "n" or if
you fail to answer within 60 seconds (such as when your new
configuration has disabled communication with your terminal), the
2006-12-03 19:42:14 +01:00
configuration is restored from the saved configuration. If a
directory is given, then Shorewall will look in that directory first
when opening configuration files.</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > safe-start</emphasis> </term>
<listitem >
<para > Shorewall is started normally. You will then be prompted
asking if everything went all right. If you answer "n" or if you
fail to answer within 60 seconds (such as when your new
configuration has disabled communication with your terminal), a
2006-12-03 19:42:14 +01:00
shorewall clear is performed for you. If a directory is given, then
Shorewall will look in that directory first when opening
configuration files.</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > save</emphasis> </term>
<listitem >
<para > The dynamic blacklist is stored in /var/lib/shorewall/save.
The state of the firewall is stored in
/var/lib/shorewall/<emphasis > filename</emphasis> for use by the
<emphasis role= "bold" > shorewall restore</emphasis> and <emphasis
role="bold">shorewall -f start</emphasis> commands. If
<emphasis > filename</emphasis> is not given then the state is saved
2007-01-14 23:34:51 +01:00
in the file specified by the RESTOREFILE option in <ulink
url="shorewall.conf.html">shorewall.conf</ulink> (5).</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > show</emphasis> </term>
2006-11-16 18:00:57 +01:00
<listitem >
2006-11-16 22:21:03 +01:00
<para > The show command can have a number of different
arguments:</para>
<variablelist >
2006-11-17 16:56:43 +01:00
<varlistentry >
<term > <emphasis role= "bold" > actions</emphasis> </term>
<listitem >
<para > Produces a report about the available actions (built-in,
standard and user-defined).</para>
2006-11-16 22:21:03 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > capabilities</emphasis> </term>
<listitem >
<para > Displays your kernel/iptables capabilities. The
<emphasis role= "bold" > -f</emphasis> option causes the display
to be formatted as a capabilities file for use with <emphasis
role="bold">compile -e</emphasis> .</para>
</listitem>
</varlistentry>
2007-06-28 20:21:28 +02:00
<varlistentry >
<term > [ [ <option > chain</option> ] <emphasis > chain</emphasis> ...
]</term>
<listitem >
<para > The rules in each <emphasis > chain</emphasis> are
displayed using the <emphasis role= "bold" > iptables
-L</emphasis> <emphasis > chain</emphasis> <emphasis
role="bold">-n -v</emphasis> command. If no
<emphasis > chain</emphasis> is given, all of the chains in the
filter table are displayed. The <emphasis
role="bold">-x</emphasis> option is passed directly through to
iptables and causes actual packet and byte counts to be
displayed. Without this option, those counts are abbreviated.
The <emphasis role= "bold" > -t</emphasis> option specifies the
Netfilter table to display. The default is <emphasis
role="bold">filter</emphasis> .</para>
<para > If the <emphasis role= "bold" > t</emphasis> option and the
2007-12-01 18:30:08 +01:00
<option > chain</option> keyword are both omitted and any of the
2007-06-29 16:28:06 +02:00
listed <replaceable > chain</replaceable> s do not exist, a usage
message is displayed.</para>
2007-06-28 20:21:28 +02:00
</listitem>
</varlistentry>
2006-11-17 16:47:07 +01:00
<varlistentry >
2008-03-19 21:43:43 +01:00
<term > <emphasis
role="bold">classifiers|filters</emphasis> </term>
2006-11-17 16:47:07 +01:00
<listitem >
<para > Displays information about the packet classifiers
defined on the system as a result of traffic shaping
configuration.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > config</emphasis> </term>
<listitem >
<para > Dispays distribution-specific defaults.</para>
</listitem>
</varlistentry>
2006-11-16 22:21:03 +01:00
<varlistentry >
<term > <emphasis role= "bold" > connections</emphasis> </term>
<listitem >
<para > Displays the IP connections currently being tracked by
the firewall.</para>
</listitem>
</varlistentry>
2006-11-17 16:47:07 +01:00
2007-04-15 19:25:25 +02:00
<varlistentry >
<term > <emphasis role= "bold" > log</emphasis> </term>
<listitem >
<para > Displays the last 20 Shorewall messages from the log
file specified by the LOGFILE option in <ulink
url="shorewall.conf.html">shorewall.conf</ulink> (5). The
<emphasis role= "bold" > -m</emphasis> option causes the MAC
address of each packet source to be displayed if that
information is available.</para>
</listitem>
</varlistentry>
2006-11-17 16:47:07 +01:00
<varlistentry >
<term > <emphasis role= "bold" > macros</emphasis> </term>
<listitem >
<para > Displays information about each macro defined on the
firewall system.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > mangle</emphasis> </term>
<listitem >
<para > Displays the Netfilter mangle table using the command
2006-11-17 16:56:43 +01:00
<emphasis role= "bold" > iptables -t mangle -L -n
-v</emphasis> .The <emphasis role= "bold" > -x</emphasis> option
is passed directly through to iptables and causes actual
packet and byte counts to be displayed. Without this option,
those counts are abbreviated.</para>
2006-11-17 16:47:07 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > nat</emphasis> </term>
<listitem >
<para > Displays the Netfilter nat table using the command
2006-11-17 16:56:43 +01:00
<emphasis role= "bold" > iptables -t nat -L -n -v</emphasis> .The
2006-11-17 16:47:07 +01:00
<emphasis role= "bold" > -x</emphasis> option is passed directly
2006-11-17 16:56:43 +01:00
through to iptables and causes actual packet and byte counts
to be displayed. Without this option, those counts are
abbreviated.</para>
2006-11-17 16:47:07 +01:00
</listitem>
</varlistentry>
2009-02-18 17:48:34 +01:00
<varlistentry >
<term > <emphasis role= "bold" > raw</emphasis> </term>
<listitem >
<para > Displays the Netfilter raw table using the command
<emphasis role= "bold" > iptables -t raw -L -n -v</emphasis> .The
<emphasis role= "bold" > -x</emphasis> option is passed directly
through to iptables and causes actual packet and byte counts
to be displayed. Without this option, those counts are
abbreviated.</para>
</listitem>
</varlistentry>
2006-11-17 16:47:07 +01:00
<varlistentry >
<term > <emphasis role= "bold" > tc</emphasis> </term>
<listitem >
<para > Displays information about queuing disciplines, classes
and filters.</para>
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > zones</emphasis> </term>
<listitem >
<para > Displays the current composition of the Shorewall zones
on the system.</para>
</listitem>
</varlistentry>
2006-11-16 22:21:03 +01:00
</variablelist>
2006-11-16 18:00:57 +01:00
</listitem>
</varlistentry>
2006-11-17 16:47:07 +01:00
<varlistentry >
<term > <emphasis role= "bold" > start</emphasis> </term>
<listitem >
<para > Start shorewall. Existing connections through shorewall
managed interfaces are untouched. New connections will be allowed
only if they are allowed by the firewall rules or policies. If a
2007-05-17 16:42:25 +02:00
<replaceable > directory</replaceable> is included in the command,
Shorewall will look in that <emphasis > directory</emphasis> first for
2008-08-03 04:33:35 +02:00
configuration files. If <emphasis role= "bold" > -f</emphasis> is
2006-11-17 16:47:07 +01:00
specified, the saved configuration specified by the RESTOREFILE
2007-01-14 23:34:51 +01:00
option in <ulink url= "shorewall.conf.html" > shorewall.conf</ulink> (5)
will be restored if that saved configuration exists and has been
2007-05-17 16:42:25 +02:00
modified more recently than the files in /etc/shorewall. When
<emphasis role= "bold" > -f</emphasis> is given, a
<replaceable > directory</replaceable> may not be specified.</para>
2007-05-09 22:41:39 +02:00
2008-03-24 21:07:15 +01:00
<para > The <option > -n</option> option causes Shorewall to avoid
updating the routing table(s).</para>
2008-04-28 19:32:31 +02:00
<para > The <option > -p</option> option causes the connection tracking
table to be flushed; the <command > conntrack</command> utility must
be installed to use this option.</para>
2006-11-17 16:47:07 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > stop</emphasis> </term>
<listitem >
<para > Stops the firewall. All existing connections, except those
2007-01-14 23:34:51 +01:00
listed in <ulink
url="shorewall-routestopped.html">shorewall-routestopped</ulink> (5)
or permitted by the ADMINISABSENTMINDED option in <ulink
url="shorewall.conf.html">shorewall.conf</ulink> (5), are taken down.
The only new traffic permitted through the firewall is from systems
listed in <ulink
url="shorewall-routestopped.html">shorewall-routestopped</ulink> (5)
or by ADMINISABSENTMINDED.</para>
2007-08-15 18:42:01 +02:00
2009-07-16 02:50:55 +02:00
<para > If <option > -f</option> is given, the command will be processed
by the compiled script that executed the last successful <emphasis
2007-08-16 18:08:53 +02:00
role="bold">start</emphasis> , <emphasis
2007-08-15 18:42:01 +02:00
role="bold">restart</emphasis> or <emphasis
role="bold">refresh</emphasis> command if that script exists.</para>
2006-11-17 16:47:07 +01:00
</listitem>
</varlistentry>
<varlistentry >
<term > <emphasis role= "bold" > status</emphasis> </term>
<listitem >
<para > Produces a short report about the state of the
Shorewall-configured firewall.</para>
</listitem>
</varlistentry>
2006-12-03 19:42:14 +01:00
<varlistentry >
<term > <emphasis role= "bold" > try</emphasis> </term>
<listitem >
<para > If Shorewall is started then the firewall state is saved to a
temporary saved configuration
(<filename > /var/lib/shorewall/.try</filename> ). Next, if Shorewall
is currently started then a <emphasis role= "bold" > restart</emphasis>
command is issued; otherwise, a <emphasis
role="bold">start</emphasis> command is performed. if an error
occurs during the compliation phase of the <emphasis
role="bold">restart</emphasis> or <emphasis
role="bold">start</emphasis> , the command terminates without
changing the Shorewall state. If an error occurs during the
<emphasis role= "bold" > restart</emphasis> phase, then a <emphasis
role="bold">shorewall restore</emphasis> is performed using the
saved configuration. If an error occurs during the <emphasis
role="bold">start</emphasis> phase, then Shorewall is cleared. If
the <emphasis role= "bold" > start</emphasis> /<emphasis
role="bold">restart</emphasis> succeeds and a
<replaceable > timeout</replaceable> is specified then a <emphasis
role="bold">clear</emphasis> or <emphasis
role="bold">restore</emphasis> is performed after
<replaceable > timeout</replaceable> seconds.</para>
</listitem>
</varlistentry>
2006-11-17 16:47:07 +01:00
<varlistentry >
<term > <emphasis role= "bold" > version</emphasis> </term>
<listitem >
2009-06-17 21:42:13 +02:00
<para > Displays Shorewall's version. The <option > -a</option> option
is included for compatibility with earlier Shorewall releases and is
ignored.</para>
2006-11-17 16:47:07 +01:00
</listitem>
</varlistentry>
2006-11-16 18:00:57 +01:00
</variablelist>
</refsect1>
<refsect1 >
<title > FILES</title>
<para > /etc/shorewall/</para>
</refsect1>
<refsect1 >
<title > See ALSO</title>
2006-11-22 04:51:39 +01:00
<para > <ulink
url="http://www.shorewall.net/starting_and_stopping_shorewall.htm">http://www.shorewall.net/starting_and_stopping_shorewall.htm</ulink> </para>
2006-11-16 22:21:03 +01:00
<para > shorewall-accounting(5), shorewall-actions(5),
2006-11-16 18:00:57 +01:00
shorewall-blacklist(5), shorewall-hosts(5), shorewall-interfaces(5),
shorewall-ipsec(5), shorewall-maclist(5), shorewall-masq(5),
shorewall-nat(5), shorewall-netmap(5), shorewall-params(5),
shorewall-policy(5), shorewall-providers(5), shorewall-proxyarp(5),
shorewall-route_rules(5), shorewall-routestopped(5), shorewall-rules(5),
shorewall.conf(5), shorewall-tcclasses(5), shorewall-tcdevices(5),
shorewall-tcrules(5), shorewall-tos(5), shorewall-tunnels(5),
shorewall-zones(5)</para>
</refsect1>
2008-08-03 04:33:35 +02:00
</refentry>