Compare commits

..

18 Commits

Author SHA1 Message Date
Tom Eastep
8441ac5c5f Handle another issue with ADD_SNAT_ALIASES=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-03 15:06:38 -07:00
Tom Eastep
01a6881f4f Catch total lack of address/port in SNAT argument
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-02 19:30:55 -07:00
Tom Eastep
f917670fbd Tighten editing of SNAT/MASQ port ranges.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-02 19:30:18 -07:00
Tom Eastep
c376740329 Detect degenerate addr:port[-range] in SNAT rules.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-02 15:28:00 -07:00
Tom Eastep
4169520d63 Handle exceptionrule correctly with MASQUERADE.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-02 14:36:51 -07:00
Tom Eastep
53d97bbcc8 Correct handling of masquerade port range when ADD_SNAT_ALIASES=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-02 12:28:00 -07:00
Tom Eastep
9ae36e1989 Correct error message when multiple SNAT addresses are present.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-02 12:27:32 -07:00
Tom Eastep
60619fb3cb Correct part of a recent patch to Nat.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-02 09:00:19 -07:00
Tom Eastep
41ecee356b Correct earlier faulty patch to Nat.pm.
- Similar Rules.pm patch was okay.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-01 19:39:52 -07:00
Tom Eastep
e188bde6c4 Fix additional masq/snat issues.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-01 18:42:16 -07:00
Tom Eastep
6e08717089 Formatting changes to snat files.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-01 17:11:43 -07:00
Tom Eastep
d37967f32f Replace --to-ports <ports> with --to-source :<ports>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-01 16:52:08 -07:00
Tom Eastep
10c1ad245a Handle omitted port[-range] in SNAT correctly.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-01 12:59:44 -07:00
Tom Eastep
032a16eb43 Detect incorrect port-range separator in SNAT(...)
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-11-01 11:28:19 -07:00
Tom Eastep
a89d8b3af4 Fix Shorewall installer re: snat file.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-10-31 16:13:48 -07:00
Tom Eastep
3f68814a38 Disallow more than one address[-range] in SNAT rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-10-31 15:15:35 -07:00
Tom Eastep
3a70185284 A couple of documentation updates
- Anatomy
- Bridge (Perl)

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-10-31 11:09:06 -07:00
Tom Eastep
95a1e65016 Clear target modifiers in interface loop
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-10-30 16:25:17 -07:00
14 changed files with 142 additions and 63 deletions

View File

@@ -472,7 +472,7 @@ sub validate_portpair1( $$ ) {
fatal_error "Invalid port range ($portpair)" if $portpair =~ tr/-/-/ > 1; fatal_error "Invalid port range ($portpair)" if $portpair =~ tr/-/-/ > 1;
$portpair = "0$portpair" if substr( $portpair, 0, 1 ) eq ':'; $portpair = "1$portpair" if substr( $portpair, 0, 1 ) eq ':';
$portpair = "${portpair}65535" if substr( $portpair, -1, 1 ) eq ':'; $portpair = "${portpair}65535" if substr( $portpair, -1, 1 ) eq ':';
my @ports = split /-/, $portpair, 2; my @ports = split /-/, $portpair, 2;
@@ -483,9 +483,10 @@ sub validate_portpair1( $$ ) {
if ( @ports == 2 ) { if ( @ports == 2 ) {
$what = 'port range'; $what = 'port range';
fatal_error "Invalid port range ($portpair)" unless $ports[0] < $ports[1]; fatal_error "Invalid port range ($portpair)" unless $ports[0] && $ports[0] < $ports[1];
} else { } else {
$what = 'port'; $what = 'port';
fatal_error 'Invalid port number (0)' unless $portpair;
} }
fatal_error "Using a $what ( $portpair ) requires PROTO TCP, UDP, SCTP or DCCP" unless fatal_error "Using a $what ( $portpair ) requires PROTO TCP, UDP, SCTP or DCCP" unless

View File

@@ -232,7 +232,7 @@ sub process_one_masq1( $$$$$$$$$$$$ )
my $addrlist = ''; my $addrlist = '';
my @addrs = split_list $addresses, 'address'; my @addrs = split_list $addresses, 'address';
fatal_error "Only one IPv6 ADDRESS may be specified" if $family == F_IPV6 && @addrs > 1; fatal_error "Only one ADDRESS may be specified" if @addrs > 1;
for my $addr ( @addrs ) { for my $addr ( @addrs ) {
if ( $addr =~ /^([&%])(.+)$/ ) { if ( $addr =~ /^([&%])(.+)$/ ) {
@@ -280,14 +280,20 @@ sub process_one_masq1( $$$$$$$$$$$$ )
} elsif ( $family == F_IPV4 ) { } elsif ( $family == F_IPV4 ) {
if ( $addr =~ /^.*\..*\..*\./ ) { if ( $addr =~ /^.*\..*\..*\./ ) {
$target = 'SNAT '; $target = 'SNAT ';
my ($ipaddr, $rest) = split ':', $addr; my ($ipaddr, $rest) = split ':', $addr, 2;
if ( $ipaddr =~ /^(.+)-(.+)$/ ) { if ( $ipaddr =~ /^(.+)-(.+)$/ ) {
validate_range( $1, $2 ); validate_range( $1, $2 );
} else { } else {
validate_address $ipaddr, 0; validate_address $ipaddr, 0;
} }
validate_portpair1( $proto, $rest ) if supplied $rest;
$addrlist .= "--to-source $addr "; if ( supplied $rest ) {
validate_portpair1( $proto, $rest );
$addrlist .= "--to-source $addr ";
} else {
$addrlist .= "--to-source $ipaddr";
}
$exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/; $exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/;
} else { } else {
my $ports = $addr; my $ports = $addr;
@@ -399,7 +405,11 @@ sub process_one_masq1( $$$$$$$$$$$$ )
if ( $snat ) { if ( $snat ) {
$target =~ s/ .*//; $target =~ s/ .*//;
$target .= '+' if $pre_nat; $target .= '+' if $pre_nat;
$target .= '(' . $addresses . ')' if $addresses ne '-' && $addresses ne 'NONAT';
if ( $addresses ne '-' && $addresses ne 'NONAT' ) {
$addresses =~ s/^://;
$target .= '(' . $addresses . ')';
}
my $line = "$target\t$networks\t$savelist\t$proto\t$ports\t$ipsec\t$mark\t$user\t$condition\t$origdest\t$probability"; my $line = "$target\t$networks\t$savelist\t$proto\t$ports\t$ipsec\t$mark\t$user\t$condition\t$origdest\t$probability";
# #

View File

@@ -5363,6 +5363,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
$pre_nat = $1; $pre_nat = $1;
$addresses = ( $2 || '' ); $addresses = ( $2 || '' );
$options = 'random' if $addresses =~ s/:?random$//; $options = 'random' if $addresses =~ s/:?random$//;
$add_snat_aliases = '';
} elsif ( $action =~ /^SNAT(\+)?\((.+)\)$/ ) { } elsif ( $action =~ /^SNAT(\+)?\((.+)\)$/ ) {
$pre_nat = $1; $pre_nat = $1;
$addresses = $2; $addresses = $2;
@@ -5377,6 +5378,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
$pre_nat = $1; $pre_nat = $1;
} elsif ( $action eq 'MASQUERADE' ) { } elsif ( $action eq 'MASQUERADE' ) {
$actiontype = $builtin_target{$target = 'MASQUERADE'}; $actiontype = $builtin_target{$target = 'MASQUERADE'};
$add_snat_aliases = '';
} else { } else {
( $target , $params ) = get_target_param1( $action ); ( $target , $params ) = get_target_param1( $action );
@@ -5455,6 +5457,8 @@ sub process_snat1( $$$$$$$$$$$$ ) {
my $rule = ''; my $rule = '';
my $saveaddresses = $addresses; my $saveaddresses = $addresses;
my $savetarget = $target;
my $savebaserule = $baserule;
my $interface = $fullinterface; my $interface = $fullinterface;
$interface =~ s/:.*//; #interface name may include 'alias' $interface =~ s/:.*//; #interface name may include 'alias'
@@ -5505,10 +5509,12 @@ sub process_snat1( $$$$$$$$$$$$ ) {
$detectaddress = 1; $detectaddress = 1;
} }
} else { } else {
fatal_error "SNAT rules must spacify a new source address and/or new source ports" unless supplied $addresses;
my $addrlist = ''; my $addrlist = '';
my @addrs = split_list $addresses, 'address'; my @addrs = split_list $addresses, 'address';
fatal_error "Only one IPv6 ADDRESS may be specified" if $family == F_IPV6 && @addrs > 1; fatal_error "Only one SNAT address may be specified" if @addrs > 1;
for my $addr ( @addrs ) { for my $addr ( @addrs ) {
if ( $addr =~ /^([&%])(.+)$/ ) { if ( $addr =~ /^([&%])(.+)$/ ) {
@@ -5551,20 +5557,27 @@ sub process_snat1( $$$$$$$$$$$$ ) {
} }
} elsif ( $family == F_IPV4 ) { } elsif ( $family == F_IPV4 ) {
if ( $addr =~ /^.*\..*\..*\./ ) { if ( $addr =~ /^.*\..*\..*\./ ) {
my ($ipaddr, $rest) = split ':', $addr; my ($ipaddr, $rest) = split ':', $addr, 2;
if ( $ipaddr =~ /^(.+)-(.+)$/ ) { if ( $ipaddr =~ /^(.+)-(.+)$/ ) {
validate_range( $1, $2 ); validate_range( $1, $2 );
} else { } else {
validate_address $ipaddr, 0; validate_address $ipaddr, 0;
} }
validate_portpair1( $proto, $rest ) if supplied $rest;
$addrlist .= " --to-source $addr"; if ( supplied $rest ) {
validate_portpair1( $proto, $rest );
$addrlist .= " --to-source $addr";
} else {
$addrlist .= " --to-source $ipaddr";
}
$exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/; $exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/;
} else { } else {
my $ports = $addr; my $ports = $addr;
$ports =~ s/^://; $ports =~ s/^://;
fatal_error "Missing Address or Port[-range] ($addr)" unless supplied $ports && $ports ne '-';
validate_portpair1( $proto, $ports ); validate_portpair1( $proto, $ports );
$addrlist .= " --to-ports $ports"; $addrlist .= " --to-source :$ports";
$exceptionrule = do_proto( $proto, '', '' ); $exceptionrule = do_proto( $proto, '', '' );
} }
} else { } else {
@@ -5614,6 +5627,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
if ( supplied $addresses ) { if ( supplied $addresses ) {
validate_portpair1($proto, $addresses ); validate_portpair1($proto, $addresses );
$target .= " --to-ports $addresses"; $target .= " --to-ports $addresses";
$exceptionrule = do_proto( $proto, '', '' );
} }
} }
# #
@@ -5699,7 +5713,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
conditional_rule_end( $chainref ) if $detectaddress || $conditional; conditional_rule_end( $chainref ) if $detectaddress || $conditional;
if ( $add_snat_aliases ) { if ( $add_snat_aliases && $addresses ) {
my ( $interface, $alias , $remainder ) = split( /:/, $fullinterface, 3 ); my ( $interface, $alias , $remainder ) = split( /:/, $fullinterface, 3 );
fatal_error "Invalid alias ($alias:$remainder)" if defined $remainder; fatal_error "Invalid alias ($alias:$remainder)" if defined $remainder;
for my $address ( split_list $addresses, 'address' ) { for my $address ( split_list $addresses, 'address' ) {
@@ -5722,6 +5736,8 @@ sub process_snat1( $$$$$$$$$$$$ ) {
} }
$addresses = $saveaddresses; $addresses = $saveaddresses;
$target = $savetarget;
$baserule = $savebaserule;
} }
progress_message " Snat record \"$currentline\" $done" progress_message " Snat record \"$currentline\" $done"

View File

@@ -10,12 +10,14 @@
# See the file README.txt for further details. # See the file README.txt for further details.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# For information about entries in this file, type "man shorewall-snat" # For information about entries in this file, type "man shorewall-snat"
################################################################################################################### #
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY # See http://shorewall.net/manpages/shorewall-snat.html for more information
###########################################################################################################################################
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY
# #
# Rules generated from masq file /home/teastep/shorewall/trunk/Shorewall/Samples/three-interfaces/masq by Shorewall 5.0.13-RC1 - Sat Oct 15 11:43:47 PDT 2016 # Rules generated from masq file /home/teastep/shorewall/trunk/Shorewall/Samples/three-interfaces/masq by Shorewall 5.0.13-RC1 - Sat Oct 15 11:43:47 PDT 2016
# #
MASQUERADE 10.0.0.0/8,\ MASQUERADE 10.0.0.0/8,\
169.254.0.0/16,\ 169.254.0.0/16,\
172.16.0.0/12,\ 172.16.0.0/12,\
192.168.0.0/16 eth0 192.168.0.0/16 eth0

View File

@@ -10,12 +10,14 @@
# See the file README.txt for further details. # See the file README.txt for further details.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# For information about entries in this file, type "man shorewall-snat" # For information about entries in this file, type "man shorewall-snat"
################################################################################################################### #
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY # See http://shorewall.net/manpages/shorewall-snat.html for more information
###########################################################################################################################################
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY
# #
# Rules generated from masq file /home/teastep/shorewall/trunk/Shorewall/Samples/two-interfaces/masq by Shorewall 5.0.13-RC1 - Sat Oct 15 11:41:40 PDT 2016 # Rules generated from masq file /home/teastep/shorewall/trunk/Shorewall/Samples/two-interfaces/masq by Shorewall 5.0.13-RC1 - Sat Oct 15 11:41:40 PDT 2016
# #
MASQUERADE 10.0.0.0/8,\ MASQUERADE 10.0.0.0/8,\
169.254.0.0/16,\ 169.254.0.0/16,\
172.16.0.0/12,\ 172.16.0.0/12,\
192.168.0.0/16 eth0 1 92.168.0.0/16 eth0

View File

@@ -1,8 +1,9 @@
# #
# Shorewall SNAT/Masquerade File # Shorewall -- /etc/shorewall/snat
# #
# For information about entries in this file, type "man shorewall-snat" # For information about entries in this file, type "man shorewall-snat"
# #
# See http://shorewall.net/manpages/shorewall-snat.html for additional information # See http://shorewall.net/manpages/shorewall-snat.html for more information
################################################################################################################### #
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY ###########################################################################################################################################
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY

View File

@@ -703,7 +703,7 @@ run_install $OWNERSHIP -m 0644 snat ${DESTDIR}${SHAREDIR}/$PRODUCT/con
run_install $OWNERSHIP -m 0644 snat.annotated ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles run_install $OWNERSHIP -m 0644 snat.annotated ${DESTDIR}${SHAREDIR}/$PRODUCT/configfiles
if [ -z "$SPARSE" -a ! -f ${DESTDIR}${CONFDIR}/$PRODUCT/snat ]; then if [ -z "$SPARSE" -a ! -f ${DESTDIR}${CONFDIR}/$PRODUCT/snat ]; then
run_install $OWNERSHIP -m 0600 masq${suffix} ${DESTDIR}${CONFDIR}/$PRODUCT/masq run_install $OWNERSHIP -m 0600 snat${suffix} ${DESTDIR}${CONFDIR}/$PRODUCT/snat
echo "SNAT file installed as ${DESTDIR}${CONFDIR}/$PRODUCT/snat" echo "SNAT file installed as ${DESTDIR}${CONFDIR}/$PRODUCT/snat"
fi fi

View File

@@ -164,7 +164,7 @@
<varlistentry> <varlistentry>
<term><emphasis role="bold">ADDRESS</emphasis> (Optional) - [<emphasis <term><emphasis role="bold">ADDRESS</emphasis> (Optional) - [<emphasis
role="bold">-</emphasis>|<emphasis role="bold">-</emphasis>|<emphasis
role="bold">NONAT</emphasis>|[<emphasis>address-or-address-range</emphasis>[,<emphasis>address-or-address-range</emphasis>]...][:<emphasis>lowport</emphasis><emphasis role="bold">NONAT</emphasis>|[<emphasis>address-or-address-range</emphasis>][:<emphasis>lowport</emphasis><emphasis
role="bold">-</emphasis><emphasis>highport</emphasis>][<emphasis role="bold">-</emphasis><emphasis>highport</emphasis>][<emphasis
role="bold">:random</emphasis>][:persistent]|<emphasis role="bold">:random</emphasis>][:persistent]|<emphasis
role="bold">detect</emphasis>|<emphasis role="bold">detect</emphasis>|<emphasis

View File

@@ -75,7 +75,7 @@
<varlistentry> <varlistentry>
<term><emphasis <term><emphasis
role="bold">SNAT[+]</emphasis>([<emphasis>address-or-address-range</emphasis>[,<emphasis>address-or-address-range</emphasis>]...][:<emphasis>lowport</emphasis><emphasis role="bold">SNAT[+]</emphasis>([<emphasis>address-or-address-range</emphasis>][:<emphasis>lowport</emphasis><emphasis
role="bold">-</emphasis><emphasis>highport</emphasis>][<emphasis role="bold">-</emphasis><emphasis>highport</emphasis>][<emphasis
role="bold">:random</emphasis>][:<option>persistent</option>]|<emphasis role="bold">:random</emphasis>][:<option>persistent</option>]|<emphasis
role="bold">detect</emphasis>|</term> role="bold">detect</emphasis>|</term>

View File

@@ -1,8 +1,9 @@
# #
# Shorewall6 SNAT/Masquerade File # Shorewall6 -- /etc/shorewall6/snat
# #
# For information about entries in this file, type "man shorewall6-snat" # For information about entries in this file, type "man shorewall6-snat"
# #
# See http://shorewall.net/manpages6/shorewall6-snat.html for additional information # See http://shorewall.net/manpages6/shorewall6-snat.html for more information
################################################################################################################### #
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY ###########################################################################################################################################
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY

View File

@@ -125,7 +125,7 @@
<varlistentry> <varlistentry>
<term><emphasis role="bold">ADDRESS</emphasis> (Optional) - [<emphasis <term><emphasis role="bold">ADDRESS</emphasis> (Optional) - [<emphasis
role="bold">-</emphasis>|<emphasis role="bold">-</emphasis>|<emphasis
role="bold">NONAT</emphasis>|[<emphasis>address-or-address-range</emphasis>[,<emphasis>address-or-address-range</emphasis>]...][:<emphasis>lowport</emphasis><emphasis role="bold">NONAT</emphasis>|[<emphasis>address-or-address-range</emphasis>][:<emphasis>lowport</emphasis><emphasis
role="bold">-</emphasis><emphasis>highport</emphasis>][<emphasis role="bold">-</emphasis><emphasis>highport</emphasis>][<emphasis
role="bold">:random</emphasis>][:persistent]|<emphasis role="bold">:random</emphasis>][:persistent]|<emphasis
role="bold">detect</emphasis>|<emphasis role="bold">detect</emphasis>|<emphasis

View File

@@ -75,7 +75,7 @@
<varlistentry> <varlistentry>
<term><emphasis <term><emphasis
role="bold">SNAT</emphasis>[+]([<emphasis>address-or-address-range</emphasis>[,<emphasis>address-or-address-range</emphasis>]...][:<emphasis>lowport</emphasis><emphasis role="bold">SNAT</emphasis>[+]([<emphasis>address-or-address-range</emphasis>][:<emphasis>lowport</emphasis><emphasis
role="bold">-</emphasis><emphasis>highport</emphasis>][<emphasis role="bold">-</emphasis><emphasis>highport</emphasis>][<emphasis
role="bold">:random</emphasis>][:<option>persistent</option>]|<emphasis role="bold">:random</emphasis>][:<option>persistent</option>]|<emphasis
role="bold">detect</emphasis>|</term> role="bold">detect</emphasis>|</term>

View File

@@ -106,8 +106,17 @@
url="Install.htm#idp8774904608">configure scripts included with Shorewall url="Install.htm#idp8774904608">configure scripts included with Shorewall
Core</ulink>.</para> Core</ulink>.</para>
<important>
<para>Since Shorewall 4.5.2, each of these directories is now
relocatable using the <ulink url="Install.htm#idp8774904608">configure
scripts included with Shorewall Core</ulink>. These scripts set shell
variables in the shorewallrc file which is normally installed in
/usr/share/shorewall/. The name of the variable is included in
parentheses in the section headings below.</para>
</important>
<section id="sbin"> <section id="sbin">
<title>/sbin</title> <title>/sbin ($SBINDIR)</title>
<para>The <filename>/sbin/shorewall</filename> shell program is used to <para>The <filename>/sbin/shorewall</filename> shell program is used to
interact with Shorewall. See <ulink interact with Shorewall. See <ulink
@@ -115,7 +124,7 @@
</section> </section>
<section id="share-shorewall"> <section id="share-shorewall">
<title>/usr/share/shorewall</title> <title>/usr/share/shorewall (${SHAREDIR}/shorewall)</title>
<para>The bulk of Shorewall is installed here.</para> <para>The bulk of Shorewall is installed here.</para>
@@ -220,22 +229,28 @@
</section> </section>
<section id="shorewall"> <section id="shorewall">
<title>/etc/shorewall</title> <title>/etc/shorewall (${CONFDIR}/shorewall)</title>
<para>This is where the modifiable IPv4 configuration files are <para>This is where the modifiable IPv4 configuration files are
installed.</para> installed.</para>
</section> </section>
<section id="init"> <section id="init">
<title>/etc/init.d or /etc/rc.d (depends on distribution)</title> <title>/etc/init.d or /etc/rc.d (depends on distribution)
($INITDIR)</title>
<para>An init script is installed here. Depending on the distribution, <para>An init script is installed here. Depending on the distribution,
it is named <filename>shorewall</filename> or it is named <filename>shorewall</filename> or
<filename>rc.firewall</filename>.</para> <filename>rc.firewall</filename>. Only installed on systems where
systemd is not installed.</para>
<para>When systemd is installed, the Shorewall .service files are
installed in the directory specified by the SERVICEDIR variable in
<filename>/usr/share/shorewall/shorewallrc</filename>.</para>
</section> </section>
<section id="var"> <section id="var">
<title>/var/lib/shorewall</title> <title>/var/lib/shorewall (${VARLIB}/shorewall)</title>
<para>Shorewall doesn't install any files in this directory but rather <para>Shorewall doesn't install any files in this directory but rather
uses the directory for storing state information. This directory may be uses the directory for storing state information. This directory may be
@@ -332,7 +347,7 @@
<para>Shorewall6 installs its files in a number of directories:</para> <para>Shorewall6 installs its files in a number of directories:</para>
<section id="sbin6"> <section id="sbin6">
<title>/sbin</title> <title>/sbin ($SBINDIR)</title>
<para>The <filename>/sbin/shorewall6</filename> shell program is used to <para>The <filename>/sbin/shorewall6</filename> shell program is used to
interact with Shorewall6. See <ulink interact with Shorewall6. See <ulink
@@ -340,7 +355,7 @@
</section> </section>
<section id="share-shorewall6"> <section id="share-shorewall6">
<title>/usr/share/shorewall6</title> <title>/usr/share/shorewall6 (${SHAREDIR}/shorewall6)</title>
<para>The bulk of Shorewall6 is installed here.</para> <para>The bulk of Shorewall6 is installed here.</para>
@@ -417,14 +432,28 @@
</section> </section>
<section id="etc-shorewall6"> <section id="etc-shorewall6">
<title>/etc/shorewall6</title> <title>/etc/shorewall6 (${CONFDIR}/</title>
<para>This is where the modifiable IPv6 configuration files are <para>This is where the modifiable IPv6 configuration files are
installed.</para> installed.</para>
</section> </section>
<section id="init">
<title>/etc/init.d or /etc/rc.d (depends on distribution)
($INITDIR)</title>
<para>An init script is installed here. Depending on the distribution,
it is named <filename>shorewall6</filename> or
<filename>rc.firewall</filename>. Only installed on systems where
systemd is not installed.</para>
<para>When systemd is installed, the Shorewall .service files are
installed in the directory specified by the SERVICEDIR variable in
<filename>/usr/share/shorewall/shorewallrc</filename>.</para>
</section>
<section id="var-shorewall6"> <section id="var-shorewall6">
<title>/var/lib/shorewall6</title> <title>/var/lib/shorewall6 (${VARLIB}/shorewall6)</title>
<para>Shorewall6 doesn't install any files in this directory but rather <para>Shorewall6 doesn't install any files in this directory but rather
uses the directory for storing state information. This directory may be uses the directory for storing state information. This directory may be
@@ -514,7 +543,7 @@
in the sub-sections that follow.</para> in the sub-sections that follow.</para>
<section id="sbin-lite"> <section id="sbin-lite">
<title>/sbin</title> <title>/sbin ($SBINDIR_</title>
<para>The <filename>/sbin/shorewall-lite</filename> shell program is <para>The <filename>/sbin/shorewall-lite</filename> shell program is
used to interact with Shorewall lite. See <ulink used to interact with Shorewall lite. See <ulink
@@ -522,22 +551,28 @@
</section> </section>
<section id="init-lite"> <section id="init-lite">
<title>/etc/init.d or /etc/rc.d (depends on distribution)</title> <title>/etc/init.d or /etc/rc.d (depends on distribution)
($INITDIR)</title>
<para>An init script is installed here. Depending on the distribution, <para>An init script is installed here. Depending on the distribution,
it is named <filename>shorewall-lite</filename> or it is named <filename>shorewall-lite</filename> or
<filename>rc.firewall</filename>.</para> <filename>rc.firewall</filename>. Only installed on systems where
systemd is not installed.</para>
<para>When systemd is installed, the Shorewall .service files are
installed in the directory specified by the SERVICEDIR variable in
<filename>/usr/share/shorewall/shorewallrc</filename>.</para>
</section> </section>
<section id="shorewall-lite"> <section id="shorewall-lite">
<title>/etc/shorewall-lite</title> <title>/etc/shorewall-lite (${CONFDIR}/shorewall-lite)</title>
<para>This is where the modifiable configuration files are <para>This is where the modifiable configuration files are
installed.</para> installed.</para>
</section> </section>
<section id="share-lite"> <section id="share-lite">
<title>/usr/share/shorewall-lite</title> <title>/usr/share/shorewall-lite (${SHAREDIR}/shorewall-lite)</title>
<para>The bulk of Shorewall-lite is installed here.</para> <para>The bulk of Shorewall-lite is installed here.</para>
@@ -586,7 +621,7 @@
</section> </section>
<section id="var-lite"> <section id="var-lite">
<title>/var/lib/shorewall-lite</title> <title>/var/lib/shorewall-lite (${VARLIB}/shorewall-lite)</title>
<para>Shorewall-lite doesn't install any files in this directory but <para>Shorewall-lite doesn't install any files in this directory but
rather uses the directory for storing state information. This directory rather uses the directory for storing state information. This directory
@@ -719,15 +754,29 @@
<filename>rc.firewall</filename>.</para> <filename>rc.firewall</filename>.</para>
</section> </section>
<section id="init">
<title>/etc/init.d or /etc/rc.d (depends on distribution)
($INITDIR)</title>
<para>An init script is installed here. Depending on the distribution,
it is named <filename>shorewall</filename>6-lite or
<filename>rc.firewall</filename>. Only installed on systems where
systemd is not installed.</para>
<para>When systemd is installed, the Shorewall .service files are
installed in the directory specified by the SERVICEDIR variable in
<filename>/usr/share/shorewall/shorewallrc</filename>.</para>
</section>
<section id="etc-shorewall6-lite"> <section id="etc-shorewall6-lite">
<title>/etc/shorewall6-lite</title> <title>/etc/shorewall6-lite (${CONFDIR}/shorewall6-lite)</title>
<para>This is where the modifiable configuration files are <para>This is where the modifiable configuration files are
installed.</para> installed.</para>
</section> </section>
<section id="share-lite6"> <section id="share-lite6">
<title>/usr/share/shorewall6-lite</title> <title>/usr/share/shorewall6-lite (${SHAREDIR}/shorewall6-lite)</title>
<para>The bulk of Shorewall-lite is installed here.</para> <para>The bulk of Shorewall-lite is installed here.</para>
@@ -776,7 +825,7 @@
</section> </section>
<section id="var-lite6"> <section id="var-lite6">
<title>/var/lib/shorewall6-lite</title> <title>/var/lib/shorewall6-lite (${VARLIB}/shorewall6-lite)</title>
<para>Shorewall6-lite doesn't install any files in this directory but <para>Shorewall6-lite doesn't install any files in this directory but
rather uses the directory for storing state information. This directory rather uses the directory for storing state information. This directory

View File

@@ -102,12 +102,9 @@
<listitem> <listitem>
<para>Your kernel must contain Netfilter physdev match support <para>Your kernel must contain Netfilter physdev match support
(CONFIG_IP_NF_MATCH_PHYSDEV=m or CONFIG_IP_NF_MATCH_PHYSDEV=y). (CONFIG_IP_NF_MATCH_PHYSDEV=m or CONFIG_IP_NF_MATCH_PHYSDEV=y).
Physdev match is standard in the 2.6 kernel series but must be patched Physdev match is standard in the 2.6 and later kernel series but must
into the 2.4 kernels (see <ulink be patched into the 2.4 kernels (see <ulink
url="http://bridge.sf.net">http://bridge.sf.net</ulink>). Bering and url="http://bridge.sf.net">http://bridge.sf.net</ulink>).</para>
Bering uCLibc users must find and install ipt_physdev.o for their
distribution and add <quote>ipt_physdev</quote> to
/etc/modules.</para>
</listitem> </listitem>
<listitem> <listitem>