Difference between revisions of "Bering-uClibc 4.x - User Guide - IPv6 Networking - Configure Shorewall6"

From bering-uClibc
Jump to: navigation, search
(add a small sample configuration)
(A small sample setup: - add some more text)
Line 31: Line 31:
 
=== Configure your Zones ===
 
=== Configure your Zones ===
  
The  
+
The <code class="filename">/etc/shorewall6/zones</code> file declares your network zones. You specify the hosts in each zone through entries in <code class="filename">/etc/shorewall6/interfaces</code>.
  
 
  ###############################################################################  
 
  ###############################################################################  
Line 42: Line 42:
 
=== Configure your Interfaces ===
 
=== Configure your Interfaces ===
  
 +
The <code class="filename">/etc/shorewall6/interfaces</code> file serves to define the firewall's network interfaces to shorewall6. The order of entries in this file is not significant in determining zone composition.
  
 
  ###############################################################################
 
  ###############################################################################
Line 48: Line 49:
 
  loc    eth1            detect  
 
  loc    eth1            detect  
  
=== Configure your Policy ===
+
(It is assumed that your SiXXS tunnel interface is named <code class="filename">sixxs</code>; you may need to change, to fit your setup.)
  
 +
=== Configure your Policy ===
 +
The file <code class="filename">/etc/shorewall6/policy</code> defines the high-level policy for connections between zones defined in <code class="filename">/etc/shorewall6/zones</code>.
 
  ###############################################################################  
 
  ###############################################################################  
 
  #SOURCE DEST    POLICY          LOG    LIMIT:          CONNLIMIT:               
 
  #SOURCE DEST    POLICY          LOG    LIMIT:          CONNLIMIT:               
Line 57: Line 60:
 
  all    all      REJECT    INFO
 
  all    all      REJECT    INFO
  
 +
'''Important:''' If you change any of the shorewall6 parameters, remember to save your configuration!
 
----
 
----
 
{| summary="Navigation footer" width="100%"
 
{| summary="Navigation footer" width="100%"

Revision as of 14:38, 16 January 2011

IPv6 Networking - Configure Shorewall6
Prev Bering-uClibc 4.x - User Guide Next


Earlier Bering-uClibc versions provided a package called 6wall.lrp which implemented an IPv6 firewall. Bering-uClibc 4.x provides shorwall6.lrp instead. Unlike 6wall.lrp, shorwall6.lrp is an official variant of the IPv4 shorwall.lrp and is supported by the same team. Improvements in the Linux kernel since 2.6.24 make Bering-uClibc 4.x a rather better IPv6 firewall platform than Bering-uClibc 3.x.

Note: The full name "Shorewall" was abbreviated to "shorwall" in order to comply with the 8 character filename length limit for MS-DOS floppy disks, hence the package file is shorwall.lrp. The name of the Shorewall6 package, shorwall6.lrp, is based on the name of the Shorewall package even though the 8 character filename length limit is no longer in effect.

In general, configuration of Shorewall6 is equivalent to configuration of Shorewall, so refer to the Shorewall chapter of this guide. For a simple setup is described below. However, note the following differences:

  • There are far fewer macros defined specifically for Shorewall6 than for Shorewall (in other word far fewer matches for /usr/share/shorewall6/macro.* than for /usr/share/shorewall/macro.*) but all of the Shorewall(4) macros can be used for Shorewall6. Where both files are present (e.g. for mDNS) the Shorewall6 macro takes priority.


Important: If you are running both Shorewall and Shorewall6 (rather than only Shorewall6) you need to make a modification to the Shorewall configuration otherwise Shorewall6 will be stopped whenever Shorewall is restarted. In file /etc/shorewall/shorewall.conf ensure that DISABLE_IPV6 is set to No.


A small sample setup

The following setup will establish a firewall for your IPV6 router, that rejects all traffic initiated anywhere on the Internet to your router and LAN, but allows any traffic from your LAN to the Net. It also allows any traffic from your router/firewall to the LAN, but rejects traffic from your router/firewall to the Internet. So it's the easiest setup with a standard low-level protection for your LAN. (Note: The sample setup is based on a IPv6 tunnel to SiXXS.)

Configure your Zones

The /etc/shorewall6/zones file declares your network zones. You specify the hosts in each zone through entries in /etc/shorewall6/interfaces.

############################################################################### 
#ZONE   TYPE            OPTIONS         IN                      OUT             
#                                       OPTIONS                 OPTIONS         
fw      firewall
net     ipv6
loc     ipv6

Configure your Interfaces

The /etc/shorewall6/interfaces file serves to define the firewall's network interfaces to shorewall6. The order of entries in this file is not significant in determining zone composition.

###############################################################################
#ZONE   INTERFACE       ANYCAST         OPTIONS
net     sixxs           detect                                        
loc     eth1            detect 

(It is assumed that your SiXXS tunnel interface is named sixxs; you may need to change, to fit your setup.)

Configure your Policy

The file /etc/shorewall6/policy defines the high-level policy for connections between zones defined in /etc/shorewall6/zones.

############################################################################### 
#SOURCE DEST    POLICY          LOG     LIMIT:          CONNLIMIT:              
#                               LEVEL   BURST           MASK                    
fw     loc      ACCEPT                   
loc    net      ACCEPT
all    all      REJECT     INFO

Important: If you change any of the shorewall6 parameters, remember to save your configuration!


Prev Up Next