shorewall_code/Shorewall-docs/samba.xml

53 lines
3.8 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<article>
<!--$Id$-->
<articleinfo>
<title>Samba/SMB</title>
<authorgroup>
<author>
<firstname>Tom</firstname>
<surname>Eastep</surname>
</author>
</authorgroup>
<pubdate>2002-10-22</pubdate>
<copyright>
<year>2002</year>
<holder>Thomas M. Eastep</holder>
</copyright>
<legalnotice>
<para>Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version
1.2 or any later version published by the Free Software Foundation; with
no Invariant Sections, with no Front-Cover, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
<quote><ulink url="GnuCopyright.htm">GNU Free Documentation License</ulink></quote>.</para>
</legalnotice>
</articleinfo>
<para>If you wish to run Samba on your firewall and access shares between
the firewall and local hosts, you need the following rules:</para>
<para><emphasis role="bold">/etc/shorewall/rules:</emphasis><informaltable><tgroup
cols="7"><thead><row><entry>ACTION</entry><entry>SOURCE</entry><entry>DESTINATION</entry><entry>PROTOCOL</entry><entry>PORT(S)</entry><entry>SOURCE
PORT(S)</entry><entry>ORIGINAL DEST</entry></row></thead><tbody><row><entry>ACCEPT</entry><entry>fw</entry><entry>loc</entry><entry>udp</entry><entry>137:139</entry><entry></entry><entry></entry></row><row><entry>ACCEPT</entry><entry>fw</entry><entry>loc</entry><entry>tcp</entry><entry>137,139,445</entry><entry></entry><entry></entry></row><row><entry>ACCEPT</entry><entry>fw</entry><entry>loc</entry><entry>udp</entry><entry>1024:</entry><entry>137</entry><entry></entry></row><row><entry>ACCEPT</entry><entry>loc</entry><entry>fw</entry><entry>udp</entry><entry>137:139</entry><entry></entry><entry></entry></row><row><entry>ACCEPT</entry><entry>loc</entry><entry>fw</entry><entry>tcp</entry><entry>137,139,445</entry><entry></entry><entry></entry></row><row><entry>ACCEPT</entry><entry>loc</entry><entry>fw</entry><entry>udp</entry><entry>1024:</entry><entry>137</entry><entry></entry></row></tbody></tgroup></informaltable></para>
<para>To pass traffic SMB/Samba traffic between zones Z1 and Z2:</para>
<para><emphasis role="bold">/etc/shorewall/rules:</emphasis><informaltable><tgroup
cols="7"><thead><row><entry>ACTION</entry><entry>SOURCE</entry><entry>DESTINATION</entry><entry>PROTOCOL</entry><entry>PORT(S)</entry><entry>SOURCE
PORT(S)</entry><entry>ORIGINAL DEST</entry></row></thead><tbody><row><entry>ACCEPT</entry><entry>Z1</entry><entry>Z2</entry><entry>udp</entry><entry>137:139</entry><entry></entry><entry></entry></row><row><entry>ACCEPT</entry><entry>Z1</entry><entry>Z2</entry><entry>tcp</entry><entry>137,139,445</entry><entry></entry><entry></entry></row><row><entry>ACCEPT</entry><entry>Z1</entry><entry>Z2</entry><entry>udp</entry><entry>1024:</entry><entry>137</entry><entry></entry></row><row><entry>ACCEPT</entry><entry>Z2</entry><entry>Z1</entry><entry>udp</entry><entry>137:139</entry><entry></entry><entry></entry></row><row><entry>ACCEPT</entry><entry>Z2</entry><entry>Z1</entry><entry>tcp</entry><entry>137,139,445</entry><entry></entry><entry></entry></row><row><entry>ACCEPT</entry><entry>Z2</entry><entry>Z1</entry><entry>udp</entry><entry>1024:</entry><entry>137</entry><entry></entry></row></tbody></tgroup></informaltable></para>
<para>To make network browsing (<quote>Network Neighborhood</quote>) work
properly between Z1 and Z2 requires a Windows Domain Controller and/or a
WINS server. I run Samba on my firewall to handle browsing between two zones
connected to my firewall. Details are <ulink url="myfiles.htm">here</ulink>.</para>
</article>