📄 shorewall-route_rules.5
字号:
.\" Title: shorewall-route_rules.\" 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\-ROUTE_RUL" "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"route_rules \- Shorewall Routing Rules file.SH "Synopsis".fam C.HP \w'\fB/etc/shorewall/route_rules\fR\ 'u\fB/etc/shorewall/route_rules\fR.fam.SH "Description".PPEntries in this file cause traffic to be routed to one of the providers listed in\m[blue]\fBshorewall\-providers\fR\m[]\&\s-2\u[1]\d\s+2(5)\&..PPThe columns in the file are as follows\&..PP\fBSOURCE\fR (Optional) \- {\fB\-\fR|\fIinterface\fR|\fIaddress\fR|\fIinterface\fR:\fIaddress\fR}.RS 4An ip\fIaddress\fR(network or host) that matches the source IP address in a packet\&. May also be specified as an\fIinterface\fRname optionally followed by ":" and an address\&. If the device\fBlo\fRis specified, the packet must originate from the firewall itself\&..RE.PP\fBDEST\fR (Optional) \- {\fB\-\fR|\fIaddress\fR}.RS 4An ip address (network or host) that matches the destination IP address in a packet\&..spIf you choose to omit either\fBSOURCE\fRor\fBDEST\fR, place "\-" in that column\&. Note that you may not omit both\fBSOURCE\fRand\fBDEST\fR\&..RE.PP\fBPROVIDER\fR \- {\fIprovider\-name\fR|\fIprovider\-number\fR|\fBmain\fR}.RS 4The provider to route the traffic through\&. May be expressed either as the provider name or the provider number\&. May also be\fBmain\fRor 254 for the main routing table\&. This can be used in combination with VPN tunnels, see example 2 below\&..RE.PP\fBPRIORITY\fR \- \fIpriority\fR.RS 4The rule\'s numeric\fIpriority\fRwhich determines the order in which the rules are processed\&. Rules with equal priority are applied in the order in which they appear in the file\&..PP1000\-1999.RS 4Before Shorewall\-generated \'MARK\' rules.RE.PP11000\-11999.RS 4After \'MARK\' rules but before Shorewall\-generated rules for ISP interfaces\&..RE.PP26000\-26999.RS 4After ISP interface rules but before \'default\' rule\&..RE.RE.SH "Examples".PPExample 1:.RS 4You want all traffic coming in on eth1 to be routed to the ISP1 provider\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray #SOURCE DEST PROVIDER PRIORITY eth1 \- ISP1 1000.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.PPExample 2:.RS 4You use OpenVPN (routed setup /tunX) in combination with multiple providers\&. In this case you have to set up a rule to ensure that the OpenVPN traffic is routed back through the tunX interface(s) rather than through any of the providers\&. 10\&.8\&.0\&.0/24 is the subnet chosen in your OpenVPN configuration (server 10\&.8\&.0\&.0 255\&.255\&.255\&.0)\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray #SOURCE DEST PROVIDER PRIORITY \- 10\&.8\&.0\&.0/24 main 1000.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.RE.SH "FILES".PP/etc/shorewall/route_rules.SH "See ALSO".PP\m[blue]\fBhttp://shorewall\&.net/MultiISP\&.html\fR\m[].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\-routestopped(5), shorewall\-rules(5), shorewall\&.conf(5), shorewall\-tcclasses(5), shorewall\-tcdevices(5), shorewall\-tcrules(5), shorewall\-tos(5), shorewall\-tunnels(5), shorewall\-zones(5).SH "Notes".IP " 1." 4shorewall-providers.RS 4\%http://www.shorewall.net/manpages/shorewall-providers.html.RE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -