Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > 45723c51178a73df679c2a8284d8eeff > files > 50

shorewall-doc-4.0.15-0.2mdvmes5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>VPN Passthrough</title><link rel="stylesheet" href="html.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="article" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="VPN"></a>VPN Passthrough</h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Tom</span> <span class="surname">Eastep</span></h3></div></div></div><div><p class="copyright">Copyright © 2002, 2004, 2005 Thomas M. Eastep</p></div><div><div class="legalnotice"><a id="id275538"></a><p>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
      “<span class="quote"><a class="ulink" href="GnuCopyright.htm" target="_self">GNU Free Documentation
      License</a></span>”.</p></div></div><div><p class="pubdate">2008/12/15</p></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#vpn">Virtual Private Networking (VPN)</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="vpn"></a>Virtual Private Networking (VPN)</h2></div></div></div><p>It is often the case that a system behind the firewall needs to be
    able to access a remote network through Virtual Private Networking (VPN).
    The two most common means for doing this are IPSEC and PPTP. The basic
    setup is shown in the following diagram:</p><div><img src="images/VPN.png" /></div><p>A system with an RFC 1918 address needs to access a remote network
    through a remote gateway. For this example, we will assume that the local
    system has IP address 192.168.1.12 and that the remote gateway has IP
    address 192.0.2.224.</p><p>If PPTP is being used and you need to have two or more local systems
    connected to the same remote server at the same time, then you should be
    sure that the PPTP helpers modules are loaded (ip_conntrack_pptp and
    ip_nat_pptp or nf_conntrack_pptp and nf_nat_pptp). Using the default
    modules file, Shorewall (Lite) will attempt to load these modules when
    Shorewall (Lite) is started.</p><p>If IPSEC is being used, you should configure IPSEC to use
    <em class="firstterm">NAT Traversal</em> -- Under NAT traversal the IPSEC
    packets (protocol 50 or 51) are encapsulated in UDP packets (normally with
    destination port 4500). Additionally, <em class="firstterm">keep-alive
    messages</em> are sent frequently so that NATing gateways between
    the end-points will retain their connection-tracking entries. This is the
    way that I connect to the HP Intranet and it works flawlessly without
    anything in Shorewall other than my ACCEPT loc-&gt;net policy. NAT
    traversal is available as a patch for Windows 2K and is a standard feature
    of Windows XP -- simply select "L2TP IPSec VPN" from the "Type of VPN"
    pulldown.</p><p>Alternatively, if you have an IPSEC gateway behind your firewall
    then you can try the following: only one system may connect to the remote
    gateway and there are firewall configuration requirements as
    follows:</p><div class="table"><a id="Table1"></a><p class="title"><b>Table 1. /etc/shorewall/rules</b></p><div class="table-contents"><table summary="/etc/shorewall/rules" border="1"><colgroup><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th align="center">ACTION</th><th align="center">SOURCE</th><th align="center">DESTINATION</th><th align="center">PROTOCOL</th><th align="center">PORT</th><th align="center">CLIENT PORT</th><th align="center">ORIGINAL DEST</th></tr></thead><tbody><tr><td>DNAT</td><td>net:192.0.2.224</td><td>loc:192.168.1.12</td><td>50</td><td> </td><td> </td><td> </td></tr><tr><td>DNAT</td><td>net:192.0.2.224</td><td>loc:192.168.1.12</td><td>udp</td><td>500</td><td> </td><td> </td></tr></tbody></table></div></div><br class="table-break" /><p>The above may or may not work — your mileage may vary. NAT Traversal
    is definitely a better solution. To use NAT traversal:</p><div class="table"><a id="Table2"></a><p class="title"><b>Table 2. /etc/shorewall/rules with NAT Traversal</b></p><div class="table-contents"><table summary="/etc/shorewall/rules with NAT Traversal" border="1"><colgroup><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th align="center">ACTION</th><th align="center">SOURCE</th><th align="center">DESTINATION</th><th align="center">PROTOCOL</th><th align="center">PORT</th><th align="center">CLIENT PORT</th><th align="center">ORIGINAL DEST</th></tr></thead><tbody><tr><td>DNAT</td><td>net:192.0.2.224</td><td>loc:192.168.1.12</td><td>udp</td><td>4500</td><td> </td><td> </td></tr><tr><td>DNAT</td><td>net:192.0.2.224</td><td>loc:192.168.1.12</td><td>udp</td><td>500</td><td> </td><td> </td></tr></tbody></table></div></div><p><br class="table-break" /></p><p>If you want to be able to give access to all of your local systems
    to the remote network, you should consider running a VPN client on your
    firewall. As starting points, see <a class="ulink" href="manpages/shorewall-tunnels.html" target="_self">The /etc/shorewall/tunnels
    manpage</a>.</p></div></div></body></html>