⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shorewall-tunnels.5

📁 sharewall is very good
💻 5
字号:
.\"     Title: shorewall-tunnels.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author].\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>.\"      Date: 03/19/2009.\"    Manual: [FIXME: manual].\"    Source: [FIXME: source].\"  Language: English.\".TH "SHOREWALL\-TUNNELS" "5" "03/19/2009" "[FIXME: source]" "[FIXME: manual]".\" -----------------------------------------------------------------.\" * (re)Define some macros.\" -----------------------------------------------------------------.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" toupper - uppercase a string (locale-aware).\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de toupper.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ\\$*.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" SH-xref - format a cross-reference to an SH section.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de SH-xref.ie n \{\.\}.toupper \\$*.el \{\\\$*.\}...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" SH - level-one heading that works better for non-TTY output.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de1 SH.\" put an extra blank line of space above the head in non-TTY output.if t \{\.sp 1.\}.sp \\n[PD]u.nr an-level 1.set-an-margin.nr an-prevailing-indent \\n[IN].fi.in \\n[an-margin]u.ti 0.HTML-TAG ".NH \\n[an-level]".it 1 an-trap.nr an-no-space-flag 1.nr an-break-flag 1\." make the size of the head bigger.ps +3.ft B.ne (2v + 1u).ie n \{\.\" if n (TTY output), use uppercase.toupper \\$*.\}.el \{\.nr an-break-flag 0.\" if not n (not TTY), use normal case (not uppercase)\\$1.in \\n[an-margin]u.ti 0.\" if not n (not TTY), put a border/line under subheading.sp -.6\l'\n(.lu'.\}...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" SS - level-two heading that works better for non-TTY output.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de1 SS.sp \\n[PD]u.nr an-level 1.set-an-margin.nr an-prevailing-indent \\n[IN].fi.in \\n[IN]u.ti \\n[SN]u.it 1 an-trap.nr an-no-space-flag 1.nr an-break-flag 1.ps \\n[PS-SS]u\." make the size of the head bigger.ps +2.ft B.ne (2v + 1u).if \\n[.$] \&\\$*...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" BB/BE - put background/screen (filled box) around block of text.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de BB.if t \{\.sp -.5.br.in +2n.ll -2n.gcolor red.di BX.\}...de EB.if t \{\.if "\\$2"adjust-for-leading-newline" \{\.sp -1.\}.br.di.in.ll.gcolor.nr BW \\n(.lu-\\n(.i.nr BH \\n(dn+.5v.ne \\n(BHu+.5v.ie "\\$2"adjust-for-leading-newline" \{\\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[].\}.el \{\\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[].\}.in 0.sp -.5v.nf.BX.in.sp .5v.fi.\}...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" BM/EM - put colored marker in margin next to block of text.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de BM.if t \{\.br.ll -2n.gcolor red.di BX.\}...de EM.if t \{\.br.di.ll.gcolor.nr BH \\n(dn.ne \\n(BHu\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[].in 0.nf.BX.in.fi.\}...\" -----------------------------------------------------------------.\" * set default formatting.\" -----------------------------------------------------------------.\" disable hyphenation.nh.\" disable justification (adjust text to left margin only).ad l.\" -----------------------------------------------------------------.\" * MAIN CONTENT STARTS HERE *.\" -----------------------------------------------------------------.SH "Name"tunnels \- Shorewall VPN definition file.SH "Synopsis".fam C.HP \w'\fB/etc/shorewall/tunnels\fR\ 'u\fB/etc/shorewall/tunnels\fR.fam.SH "Description".PPThe tunnels file is used to define rules for encapsulated (usually encrypted) traffic to pass between the Shorewall system and a remote gateway\&. Traffic flowing through the tunnel is handled using the normal zone/policy/rule mechanism\&. See\m[blue]\fBhttp://www\&.shorewall\&.net/VPNBasics\&.html\fR\m[]for details\&..PPThe columns in the file are as follows\&..PP\fBTYPE\fR \- {\fBipsec\fR[\fB:{noah\fR|ah}]|\fBipsecnat\fR|\fBipip\fR|\fBgre\fR|l2tp|\fBpptpclient\fR|\fBpptpserver\fR|{\fBopenvpn\fR|\fBopenvpnclient\fR|\fBopenvpnserver\fR}[:{\fBtcp\fR|\fBudp\fR}]\fB[\fR:\fIport\fR]|\fBgeneric\fR\fB:\fR\fIprotocol\fR[\fB:\fR\fIport\fR]}.RS 4Types are as follows:.sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        \fBipsec\fR         \- IPv4 IPSEC        \fBipsecnat\fR      \- IPv4 IPSEC with NAT Traversal (UDP port 4500 encapsulation)        \fBipip\fR          \- IPv4 encapsulated in IPv4 (Protocol 4)        \fBgre\fR           \- Generalized Routing Encapsulation (Protocol 47)        \fBl2tp\fR          \- Layer 2 Tunneling Protocol (UDP port 1701)        \fBpptpclient\fR    \- PPTP Client runs on the firewall        \fBpptpserver\fR    \- PPTP Server runs on the firewall        \fBopenvpn\fR       \- OpenVPN in point\-to\-point mode        \fBopenvpnclient\fR \- OpenVPN client runs on the firewall        \fBopenvpnserver\fR \- OpenVPN server runs on the firewall        \fBgeneric\fR       \- Other tunnel type.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.spIf the type is\fBipsec\fR, it may be followed by\fB:ah\fRto indicate that the Authentication Headers protocol (51) is used by the tunnel (the default is\fB:noah\fRwhich means that protocol 51 is not used)\&. NAT traversal is only supported with ESP (protocol 50) so\fBipsecnat\fRtunnels don\'t allow the\fBah\fRoption (\fBipsecnat:noah\fRmay be specified but is redundant)\&..spIf type is\fBopenvpn\fR,\fBopenvpnclient\fRor\fBopenvpnserver\fRit may optionally be followed by ":" and\fBtcp\fRor\fBudp\fRto specify the protocol to be used\&. If not specified,\fBudp\fRis assumed\&..spIf type is\fBopenvpn\fR,\fBopenvpnclient\fRor\fBopenvpnserver\fRit may optionally be followed by ":" and the port number used by the tunnel\&. if no ":" and port number are included, then the default port of 1194 will be used\&. \&. Where both the protocol and port are specified, the protocol must be given first (e\&.g\&., openvpn:tcp:4444)\&..spIf type is\fBgeneric\fR, it must be followed by ":" and a protocol name (from /etc/protocols) or a protocol number\&. If the protocol is\fBtcp\fRor\fBudp\fR(6 or 17), then it may optionally be followed by ":" and a port number\&..RE.PP.RS 4.RE.PP\fBZONE\fR \- \fIzone\fR.RS 4The\fIzone\fRof the physical interface through which tunnel traffic passes\&. This is normally your internet zone\&..RE.PP\fBGATEWAY\fR \- \fIaddress\-or\-range\fR.RS 4The IP address of the remote tunnel gateway\&. If the remote gateway has no fixed address (Road Warrior) then specify the gateway as\fB0\&.0\&.0\&.0/0\fR\&. May be specified as a network address and if your kernel and iptables include iprange match support then IP address ranges are also allowed\&..RE.PP\fBGATEWAY ZONES\fR (Optional) \- [\fIzone\fR[\fB,\fR\fIzone\fR]\&.\&.\&.].RS 4If the gateway system specified in the third column is a standalone host then this column should contain a comma\-separated list of the names of the zones that the host might be in\&. This column only applies to IPSEC tunnels where it enables ISAKMP traffic to flow through the tunnel to the remote gateway\&..RE.SH "Example".PPExample 1:.RS 4IPSec tunnel\&..spThe remote gateway is 4\&.33\&.99\&.124 and the remote subnet is 192\&.168\&.9\&.0/24\&. The tunnel does not use the AH protocol.sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        #TYPE           ZONE    GATEWAY        ipsec:noah      net     4\&.33\&.99\&.124.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.PPExample 2:.RS 4Road Warrior (LapTop that may connect from anywhere) where the "gw" zone is used to represent the remote LapTop.sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        #TYPE           ZONE    GATEWAY         GATEWAY ZONES        ipsec           net     0\&.0\&.0\&.0/0       gw.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.PPExample 3:.RS 4Host 4\&.33\&.99\&.124 is a standalone system connected via an ipsec tunnel to the firewall system\&. The host is in zone gw\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        #TYPE           ZONE    GATEWAY         GATEWAY ZONES        ipsec           net     4\&.33\&.99\&.124     gw.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.PPExample 4:.RS 4Road Warriors that may belong to zones vpn1, vpn2 or vpn3\&. The FreeS/Wan _updown script will add the host to the appropriate zone using the\fBshorewall add\fRcommand on connect and will remove the host from the zone at disconnect time\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        #TYPE           ZONE    GATEWAY         GATEWAY ZONES        ipsec           net     0\&.0\&.0\&.0/0       vpn1,vpn2,vpn3.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.PPExample 5:.RS 4You run the Linux PPTP client on your firewall and connect to server 192\&.0\&.2\&.221\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        #TYPE           ZONE    GATEWAY         GATEWAY ZONES        pptpclient      net     192\&.0\&.2\&.221.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.PPExample 6:.RS 4You run a PPTP server on your firewall\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        #TYPE           ZONE    GATEWAY         GATEWAY ZONES        pptpserver      net     0\&.0\&.0\&.0/0.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.PPExample 7:.RS 4OPENVPN tunnel\&. The remote gateway is 4\&.33\&.99\&.124 and openvpn uses port 7777\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        #TYPE           ZONE    GATEWAY         GATEWAY ZONES        openvpn:7777    net     4\&.33\&.99\&.124.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.PPExample 8:.RS 4You have a tunnel that is not one of the supported types\&. Your tunnel uses UDP port 4444\&. The other end of the tunnel is 4\&.3\&.99\&.124\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray        #TYPE            ZONE    GATEWAY         GATEWAY ZONES        generic:udp:4444 net     4\&.3\&.99\&.124.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.SH "FILES".PP/etc/shorewall/tunnels.SH "See ALSO".PPshorewall(8), shorewall\-accounting(5), shorewall\-actions(5), 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\-zones(5)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -