blob: 6a266eff47889b0d2ebcdd616ed20f3142e85e75 [file] [log] [blame]
Bart De Schuymereecff422002-12-03 20:50:30 +00001.TH EBTABLES 8 "03 December 2002"
Bart De Schuymer1abc55d2002-06-01 19:23:47 +00002.\"
Bart De Schuymereecff422002-12-03 20:50:30 +00003.\" Man page written by Bart De Schuymer <bdschuym@pandora.be>
Bart De Schuymer1abc55d2002-06-01 19:23:47 +00004.\" It is based on the iptables man page.
5.\"
6.\" Iptables page by Herve Eychenne March 2000.
7.\"
8.\" This program is free software; you can redistribute it and/or modify
9.\" it under the terms of the GNU General Public License as published by
10.\" the Free Software Foundation; either version 2 of the License, or
11.\" (at your option) any later version.
12.\"
13.\" This program is distributed in the hope that it will be useful,
14.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16.\" GNU General Public License for more details.
17.\"
18.\" You should have received a copy of the GNU General Public License
19.\" along with this program; if not, write to the Free Software
20.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21.\"
22.\"
23.SH NAME
Bart De Schuymer63e2c702002-08-01 15:30:15 +000024ebtables (v.2.0) \- Ethernet bridge frame table administration
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000025.SH SYNOPSIS
Bart De Schuymer29749c62002-06-25 21:27:57 +000026.BR "ebtables -[ADI] " "chain rule-specification " [ options ]
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000027.br
28.BR "ebtables -P " "chain target"
29.br
30.BR "ebtables -[FLZ] [" "chain" "]"
31.br
Bart De Schuymer29749c62002-06-25 21:27:57 +000032.BR "ebtables -[NX] " chain
33.br
34.BR "ebtables -E " "old-chain-name new-chain-name"
35.br
Bart De Schuymera02773a2002-07-15 19:42:11 +000036.BR "ebtables --init-table"
37.br
Bart De Schuymereecff422002-12-03 20:50:30 +000038.BR "ebtables --atomic-init "
Bart De Schuymer234bce92002-07-14 21:25:08 +000039.br
Bart De Schuymereecff422002-12-03 20:50:30 +000040.BR "ebtables --atomic-save "
Bart De Schuymer234bce92002-07-14 21:25:08 +000041.br
Bart De Schuymereecff422002-12-03 20:50:30 +000042.BR "ebtables --atomic-commit "
Bart De Schuymer234bce92002-07-14 21:25:08 +000043.br
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000044.SH DESCRIPTION
45.B ebtables
46is used to set up, maintain, and inspect the tables of Ethernet frame
47rules in the Linux kernel. It works analogous as iptables, but is less
48complicated. This man page is written with the man page of iptables
49next to it, so don't be surprised to see copied sentences and structure.
50
51There are three tables with built-in chains. Each chain is a list
52of rules which can match frames: each rule specifies what to do with a
53frame which matches. This is called a 'target'. The tables are used to
54divide functionality into different sets of chains.
55
56.SS TARGETS
57A firewall rule specifies criteria for a frame, and a target. If the
58frame does not match, the next rule in the chain is the examined one; if
59it does match, then the next thing to do is specified by the target.
60This target can be one of these values:
61.IR ACCEPT ,
62.IR DROP ,
63.IR CONTINUE ,
Bart De Schuymer29749c62002-06-25 21:27:57 +000064.IR RETURN ,
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000065an extention.
66.PP
67.I ACCEPT
68means to let the frame through.
69.I DROP
70means the frame has to be dropped.
71.I CONTINUE
72means the next rule has to be checked. This can be handy to know how many
Bart De Schuymer29749c62002-06-25 21:27:57 +000073frames pass a certain point in the chain or to log those frames.
74.I RETURN
75means stop traversing this chain and resume at the next rule in the
76previous (calling) chain.
77For the
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000078other targets see the
79.B "TARGET EXTENSIONS"
80section.
81.SS TABLES
82There are three tables.
83.TP
84.B "-t, --table"
85This option specifies the frame matching table which the command should
Bart De Schuymer29749c62002-06-25 21:27:57 +000086operate on. If specified it should be the first option. The tables are:
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000087.BR filter ,
88this is the default table and contains three chains:
89.B INPUT
90(for frames destined for the bridge itself),
91.B OUTPUT
92(for locally-generated frames) and
93.B FORWARD
94(for frames being bridged).
95.BR nat ,
96this table is used to change the mac addresses and contains three chains:
97.B PREROUTING
98(for altering frames as soon as they come in),
99.B OUTPUT
100(for altering locally generated frames before they are bridged) and
101.B POSTROUTING
102(for altering frames as they are about to go out). A small note on the naming
103of chains POSTROUTING and PREROUTING: it would be more accurate to call them
104PREFORWARDING and POSTFORWARDING, but for all those who come from the
105.BR iptables " world to " ebtables
106it is easier to have the same names.
107.BR broute ,
108this table is used to make a brouter, it has one chain:
109.BR BROUTING .
110The targets
111.BR DROP " and " ACCEPT
112have special meaning in this table.
113.B DROP
114actually means the frame has to be routed, while
115.B ACCEPT
116means the frame has to be bridged. The
117.B BROUTING
118chain is traversed very early. It is only traversed by frames entering on
119a bridge enslaved nic that is in forwarding state. Normally those frames
120would be bridged, but you can decide otherwise here. The
121.B redirect
122target is very handy here.
123.SH OPTIONS
124The options can be divided into several different groups.
125.SS COMMANDS
126These options specify the specific actions to perform; only one of them
127can be specified on the command line (the
128.B -Z
129command is an exception). All these options only apply to the selected
130(or default) table.
131.TP
132.B "-A, --append"
133Append a rule to the end of the selected chain.
134.TP
135.B "-D, --delete"
Bart De Schuymerabc84172002-11-06 21:02:33 +0000136Delete the specified rule from the selected chain. There are two ways to
137use this command. The first is by specifying an interval of rule numbers
138to delete, syntax: start_nr[:end_nr]. The second usage is by specifying
139the complete rule as it would have been specified when it was added.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000140.TP
141.B "-I, --insert"
142Insert the specified rule into the selected chain at the specified rule number (1 meaning
143the head of the chain).
144.TP
145.B "-L, --list"
146List all rules in the selected chain. If no chain is selected, all chains
Bart De Schuymeraac31142002-08-11 11:57:52 +0000147are listed.
Bart De Schuymer234bce92002-07-14 21:25:08 +0000148.br
Bart De Schuymeraac31142002-08-11 11:57:52 +0000149The following three options change the output:
Bart De Schuymer234bce92002-07-14 21:25:08 +0000150.br
151.B "--Ln"
152.br
153Puts rule numbers in front of every rule.
154.br
155.B "--Lc"
156.br
Bart De Schuymeree83c672002-10-17 21:59:43 +0000157Shows the counters at the end of every rule, there is a frame counter
158(pcnt) and a byte counter (bcnt).
Bart De Schuymer234bce92002-07-14 21:25:08 +0000159.br
160.B "--Lx"
161.br
162The output is directly usable as executable commands in a script, to be
163run f.e. at bootup. This option is incompatible with the previous two
164options. When no chain name was specified for the
165.B "-L"
166command, all necessary commands for making the user defined chains and
167renaming the standard chains will be made.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000168.TP
169.B "-F, --flush"
170Flush the selected chain. If no chain is selected, every chain will be
171flushed. This does not change the policy of the chain.
172.TP
Bart De Schuymera02773a2002-07-15 19:42:11 +0000173.B "--init-table"
174Replace the current table data by the initial table data.
175.TP
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000176.B "-Z, --zero"
177Put the counters of the selected chain on zero. If no chain is selected, all the counters
178are put on zero. This can be used in conjunction with the -L command (see above).
179This will cause the rule counters to be printed on the screen before they are put on zero.
180.TP
181.B "-P, --policy"
Bart De Schuymerefc3c862002-12-07 11:36:47 +0000182Set the policy for the chain to the given target. The policy can be
183.BR ACCEPT ", " DROP " or " RETURN .
Bart De Schuymer29749c62002-06-25 21:27:57 +0000184.TP
185.B "-N, --new-chain"
Bart De Schuymer63e2c702002-08-01 15:30:15 +0000186Create a new user-defined chain by the given name. The number of
187user-defined chains is unlimited. A chain name has max length of 31.
Bart De Schuymer29749c62002-06-25 21:27:57 +0000188.TP
189.B "-X, --delete-chain"
190Delete the specified user-defined chain. There must be no references to the
191chain,
192.B ebtables
193will complain if there are.
194.TP
195.B "-E, --rename-chain"
196Rename the specified chain to the new name. This has no effect on the
197structure of the table. It is also allowed to rename a base chain, f.e.
198if you like PREBRIDGING more than PREROUTING. Be sure to talk about the
199standard chain names when you would ask a question on a mailing list.
Bart De Schuymer234bce92002-07-14 21:25:08 +0000200.TP
201.B "--atomic-init"
Bart De Schuymera02773a2002-07-15 19:42:11 +0000202Copy the kernel's initial data of the table to the specified
Bart De Schuymer234bce92002-07-14 21:25:08 +0000203file. This can be used as the first action, after which rules are added
Bart De Schuymereecff422002-12-03 20:50:30 +0000204to the file. The file can be specified using the
205.B --atomic-file
206option or through the
207.IR EBTABLES_ATOMIC_FILE " environment variable."
Bart De Schuymer234bce92002-07-14 21:25:08 +0000208.TP
209.B "--atomic-save"
Bart De Schuymera02773a2002-07-15 19:42:11 +0000210Copy the kernel's current data of the table to the specified
Bart De Schuymer234bce92002-07-14 21:25:08 +0000211file. This can be used as the first action, after which rules are added
Bart De Schuymereecff422002-12-03 20:50:30 +0000212to the file. The file can be specified using the
213.B --atomic-file
214option or through the
215.IR EBTABLES_ATOMIC_FILE " environment variable."
Bart De Schuymer234bce92002-07-14 21:25:08 +0000216.TP
217.B "--atomic-commit"
218Replace the kernel table data with the data contained in the specified
219file. This is a useful command that allows you to put all your rules of a
220certain table into the kernel at once, saving the kernel a lot of precious
Bart De Schuymereecff422002-12-03 20:50:30 +0000221time and allowing atomic updates of the tables. The file which contains
222the table data is constructed by using either the
Bart De Schuymer234bce92002-07-14 21:25:08 +0000223.B "--atomic-init"
224or the
225.B "--atomic-save"
226command to get a starting file. After that, using the
Bart De Schuymereecff422002-12-03 20:50:30 +0000227.B "--atomic-file"
228option when constructing rules or setting the
229.IR EBTABLES_ATOMIC_FILE " environment variable"
230allows you to extend the file and build the complete table before
231commiting it to the kernel.
Bart De Schuymer29749c62002-06-25 21:27:57 +0000232.SS
233PARAMETERS
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000234The following parameters make up a rule specification (as used in the add
235and delete commands). A "!" argument before the specification inverts the
236test for that specification. Apart from these standard parameters, there are others, see
237.BR "MATCH EXTENSIONS" .
238.TP
239.BR "-p, --protocol " "[!] \fIprotocol\fP"
240The protocol that was responsible for creating the frame. This can be a
241hexadecimal number, above
242.IR 0x0600 ,
243a name (e.g.
244.I ARP
245) or
246.BR LENGTH .
247The protocol field of the Ethernet frame can be used to denote the
248length of the header (802.2/802.3 networks). When the value of that field is
249below (or equals)
250.IR 0x0600 ,
251the value equals the size of the header and shouldn't be used as a
252protocol number. Instead, all frames where the protocol field is used as
253the length field are assumed to be of the same 'protocol'. The protocol
254name used in
255.B ebtables
256for these frames is
257.BR LENGTH .
258.br
259The file
260.B /etc/ethertypes
261can be used to show readable
262characters instead of hexadecimal numbers for the protocols. For example,
263.I 0x0800
264will be represented by
265.IR IPV4 .
266The use of this file is not case sensitive.
267See that file for more information. The flag
268.B --proto
269is an alias for this option.
270.TP
271.BR "-i, --in-interface " "[!] \fIname\fP"
272The interface via which a frame is received (for the
273.BR INPUT ,
274.BR FORWARD ,
275.BR PREROUTING " and " BROUTING
276chains). The flag
277.B --in-if
278is an alias for this option.
279.TP
280.BR "--logical-in " "[!] \fIname\fP"
281The (logical) bridge interface via which a frame is received (for the
282.BR INPUT ,
283.BR FORWARD ,
284.BR PREROUTING " and " BROUTING
285chains).
286.TP
287.BR "-o, --out-interface " "[!] \fIname\fP"
288The interface via which a frame is going to be sent (for the
289.BR OUTPUT ,
290.B FORWARD
291and
292.B POSTROUTING
293chains). The flag
294.B --out-if
295is an alias for this option.
296.TP
297.BR "--logical-out " "[!] \fIname\fP"
298The (logical) bridge interface via which a frame is going to be sent (for
299the
300.BR OUTPUT ,
301.B FORWARD
302and
303.B POSTROUTING
304chains).
305.TP
306.BR "-s, --source " "[!] \fIaddress\fP[/\fImask\fP]"
307The source mac address. Both mask and address are written as 6 hexadecimal
308numbers seperated by colons. Alternatively one can specify Unicast,
309Multicast or Broadcast.
310.br
311Unicast=00:00:00:00:00:00/01:00:00:00:00:00,
312Multicast=01:00:00:00:00:00/01:00:00:00:00:00 and
313Broadcast=ff:ff:ff:ff:ff:ff/ff:ff:ff:ff:ff:ff. Note that a broadcast
314address will also match the multicast specification. The flag
315.B --src
316is an alias for this option.
317.TP
318.BR "-d, --destination " "[!] \fIaddress\fP[/\fImask\fP]"
319The destination mac address. See -s (above) for more details. The flag
320.B --dst
321is an alias for this option.
322
323.SS OTHER OPTIONS
324.TP
325.B "-V, --version"
326Show the version of the userprogram.
327.TP
328.B "-h, --help"
329Give a brief description of the command syntax. Here you can also specify
330names of extensions and
331.B ebtables
332will try to write help about those extensions. E.g. ebtables -h snat log ip arp.
Bart De Schuymer7c255f02003-01-11 16:19:48 +0000333Specify
334.I list_extensions
335to list all extensions supported by the userspace
336utility.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000337.TP
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000338.BR "-j, --jump " "\fItarget\fP"
339The target of the rule. This is one of the following values:
340.BR ACCEPT ,
341.BR DROP ,
342.BR CONTINUE ,
Bart De Schuymer63e2c702002-08-01 15:30:15 +0000343.BR RETURN ,
344a target extension (see
345.BR "TARGET EXTENSIONS" ")"
346or a user defined chain name.
Bart De Schuymer86fe8602002-06-15 08:16:41 +0000347.TP
Bart De Schuymereecff422002-12-03 20:50:30 +0000348.B --atomic-file file
Bart De Schuymer234bce92002-07-14 21:25:08 +0000349Let the command operate on the specified file. The data of the table to
350operate on will be extracted from the file and the result of the operation
351will be saved back into the file. If specified, this option should come
Bart De Schuymereecff422002-12-03 20:50:30 +0000352before the command specification. An alternative that should be preferred,
353is setting the
Bart De Schuymer97819962002-12-11 21:23:07 +0000354.BR EBTABLES_ATOMIC_FILE " environment variable."
Bart De Schuymer234bce92002-07-14 21:25:08 +0000355.TP
Bart De Schuymer2ac6b742002-07-20 16:14:38 +0000356.B -M, --modprobe program
Bart De Schuymer234bce92002-07-14 21:25:08 +0000357When talking to the kernel, use this program to try to automatically load
358missing kernel modules.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000359.SH MATCH EXTENSIONS
360.B ebtables
361extensions are precompiled into the userspace tool. So there is no need
362to explicitly load them with a -m option like in iptables. However, these
363extensions deal with functionality supported by supplemental kernel modules.
364.SS ip
365Specify ip specific fields. These will only work if the protocol equals
366.BR IPv4 .
367.TP
368.BR "--ip-source " "[!] \fIaddress\fP[/\fImask\fP]"
369The source ip address.
370The flag
371.B --ip-src
372is an alias for this option.
373.TP
374.BR "--ip-destination " "[!] \fIaddress\fP[/\fImask\fP]"
375The destination ip address.
376The flag
377.B --ip-dst
378is an alias for this option.
379.TP
380.BR "--ip-tos " "[!] \fItos\fP"
381The ip type of service, in hexadecimal numbers.
382.BR IPv4 .
383.TP
384.BR "--ip-protocol " "[!] \fIprotocol\fP"
385The ip protocol.
386The flag
387.B --ip-proto
388is an alias for this option.
Bart De Schuymer4883ba52002-09-19 21:10:45 +0000389.TP
390.BR "--ip-source-port " "[!] \fIport\fP[:\fIport\fP]"
391The source port or port range for the ip protocols 6 (TCP) and 17
392(UDP). If the first port is omitted, "0" is assumed; if the last
393is omitted, "65535" is assumed. The flag
394.B --ip-sport
395is an alias for this option.
396.TP
397.BR "--ip-destination-port " "[!] \fIport\fP[:\fIport\fP]"
398The destination port or port range for ip protocols 6 (TCP) and
39917 (UDP). The flag
400.B --ip-dport
401is an alias for this option.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000402.SS arp
403Specify arp specific fields. These will only work if the protocol equals
404.BR ARP " or " RARP .
405.TP
406.BR "--arp-opcode " "[!] \fIopcode\fP"
Bart De Schuymer9553d9c2002-07-23 21:13:05 +0000407The (r)arp opcode (decimal or a string, for more details see
408.BR "ebtables -h arp" ).
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000409.TP
410.BR "--arp-htype " "[!] \fIhardware type\fP"
411The hardware type, this can be a decimal or the string "Ethernet". This
412is normally Ethernet (value 1).
413.TP
414.BR "--arp-ptype " "[!] \fIprotocol type\fP"
415The protocol type for which the (r)arp is used (hexadecimal or the string "IPv4").
416This is normally IPv4 (0x0800).
417.TP
418.BR "--arp-ip-src " "[!] \fIaddress\fP[/\fImask\fP]"
419The ARP IP source address specification.
420.TP
421.BR "--arp-ip-dst " "[!] \fIaddress\fP[/\fImask\fP]"
422The ARP IP destination address specification.
423.SS vlan
fnm3f794d5a2002-06-14 17:28:13 +0000424Specify 802.1Q Tag Control Information fields. These will only work if the protocol equals
fnm3ed7e9012002-06-25 16:43:23 +0000425.BR 802_1Q.
426Also see extension help by
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000427.BR "ebtables -h vlan" .
428.TP
429.BR "--vlan-id " "[!] \fIid\fP"
fnm3ed7e9012002-06-25 16:43:23 +0000430The VLAN identifier field, VID (decimal number from 0 to 4094).
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000431.TP
432.BR "--vlan-prio " "[!] \fIprio\fP"
fnm3ed7e9012002-06-25 16:43:23 +0000433The user_priority field, this can be a decimal number from 0 to 7.
434Required VID to be 0 (null VID) or not specified vlan-id parameter (in this case VID deliberately be set to 0).
fnm3f794d5a2002-06-14 17:28:13 +0000435.TP
fnm3ed7e9012002-06-25 16:43:23 +0000436.BR "--vlan-encap " "[!] \fItype\fP"
Bart De Schuymer9553d9c2002-07-23 21:13:05 +0000437The encapsulated Ethernet frame type/length, this can be a hexadecimal
438number from 0x0000 to 0xFFFF.
fnm3ed7e9012002-06-25 16:43:23 +0000439Usually it's 0x0800 (IPv4). See also
440.B /etc/ethertypes
441file.
Bart De Schuymer2ac6b742002-07-20 16:14:38 +0000442.SS mark_m
443.TP
Bart De Schuymer8a8ca612002-07-21 15:18:07 +0000444.BR "--mark " "[!] [\fIvalue\fP][/\fImask\fP]"
445Matches frames with the given unsigned mark value. If a mark value and
446mask is specified, the logical AND of the mark value of the frame and
447the user specified mask is taken before comparing with the user specified
448mark value. If only a mask is specified (start with '/') the logical AND
449of the mark value of the frame and the user specified mark is taken and
450the result is compared with zero.
Bart De Schuymer2ac6b742002-07-20 16:14:38 +0000451
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000452.SH WATCHER EXTENSION(S)
Bart De Schuymer9553d9c2002-07-23 21:13:05 +0000453Watchers are things that only look at frames passing by. These watchers only
454see the frame if the frame passes all the matches of the rule.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000455.SS log
456The fact that the log module is a watcher lets us log stuff while giving a target
457by choice. Note that the log module therefore is not a target.
458.TP
459.B "--log"
460.br
461Use this if you won't specify any other log options, so if you want to use the default
462settings: log-prefix="", no arp logging, no ip logging, log-level=info.
463.TP
464.B --log-level "\fIlevel\fP"
465.br
466defines the logging level. For the possible values: ebtables -h log.
467The default level is
468.IR info .
469.TP
470.BR --log-prefix " \fItext\fP"
471.br
472defines the prefix to be printed before the logging information.
473.TP
474.B --log-ip
475.br
476will log the ip information when a frame made by the ip protocol matches
477the rule. The default is no ip information logging.
478.TP
479.B --log-arp
480.br
481will log the (r)arp information when a frame made by the (r)arp protocols
482matches the rule. The default is no (r)arp information logging.
483.SS TARGET EXTENSIONS
484.TP
485.B snat
486The
487.B snat
488target can only be used in the
489.BR POSTROUTING " chain of the " nat " table."
490It specifies that the source mac address has to be changed.
491.br
492.BR "--to-source " "\fIaddress\fP"
493.br
494The flag
495.B --to-src
496is an alias for this option.
497.br
498.BR "--snat-target " "\fItarget\fP"
499.br
500Specifies the standard target. After doing the snat, the rule still has
501to give a standard target so
502.B ebtables
503knows what to do.
504The default target is ACCEPT. Making it CONTINUE could let you use
505multiple target extensions on the same frame. Making it DROP doesn't
Bart De Schuymer29749c62002-06-25 21:27:57 +0000506make sense, but you could do that too. RETURN is also allowed. Note
Bart De Schuymer4c4447d2002-07-25 14:55:14 +0000507that using RETURN in a base chain is not allowed.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000508.TP
509.B dnat
510The
511.B dnat
512target can only be used in the
513.BR BROUTING " chain of the " broute " table and the "
514.BR PREROUTING " and " OUTPUT " chains of the " nat " table."
515It specifies that the destination mac address has to be changed.
516.br
517.BR "--to-destination " "\fIaddress\fP"
518.br
519The flag
520.B --to-dst
521is an alias for this option.
522.br
523.BR "--dnat-target " "\fItarget\fP"
524.br
525Specifies the standard target. After doing the dnat, the rule still has to
526give a standard target so
527.B ebtables
528knows what to do.
529The default target is ACCEPT. Making it CONTINUE could let you use
530multiple target extensions on the same frame. Making it DROP only makes
531sense in the BROUTING chain but using the redirect target is more logical
Bart De Schuymer29749c62002-06-25 21:27:57 +0000532there. RETURN is also allowed. Note
Bart De Schuymer4c4447d2002-07-25 14:55:14 +0000533that using RETURN in a base chain is not allowed.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000534.TP
535.B redirect
536The
537.B redirect
538target will change the MAC target address to that of the bridge device the
539frame arrived on. This target can only be used in the
540.BR BROUTING " chain of the " broute " table and the "
541.BR PREROUTING " chain of the " nat " table."
542.br
543.BR "--redirect-target " "\fItarget\fP"
544.br
545Specifies the standard target. After doing the MAC redirect, the rule
546still has to give a standard target so
547.B ebtables
548knows what to do.
549The default target is ACCEPT. Making it CONTINUE could let you use
550multiple target extensions on the same frame. Making it DROP in the
Bart De Schuymer29749c62002-06-25 21:27:57 +0000551BROUTING chain will let the frames be routed. RETURN is also allowed. Note
Bart De Schuymer4c4447d2002-07-25 14:55:14 +0000552that using RETURN in a base chain is not allowed.
Bart De Schuymer2ac6b742002-07-20 16:14:38 +0000553.TP
554.B mark
555The mark target can be used in every chain of every table. It is possible
556to use the marking of a frame/packet in both ebtables and iptables,
557if the br-nf code is compiled into the kernel. Both put the marking at the
558same place. So, you can consider this fact as a feature, or as something to
559watch out for.
560.br
561.BR "--mark-target " "\fItarget\fP"
562.br
563Specifies the standard target. After marking the frame, the rule
564still has to give a standard target so
565.B ebtables
566knows what to do.
567The default target is ACCEPT. Making it CONTINUE can let you do other
568things with the frame in other rules of the chain.
569.br
570.BR "--set-mark " "\fIvalue\fP"
571.br
572Mark the frame with the specified unsigned value.
573.br
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000574.SH FILES
575.I /etc/ethertypes
Bart De Schuymereecff422002-12-03 20:50:30 +0000576.SH ENVIRONMENT VARIABLES
577.I EBTABLES_ATOMIC_FILE
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000578.SH BUGS
579This won't work on an architecture with a user32/kernel64 situation like the Sparc64.
580.SH AUTHOR
Bart De Schuymereecff422002-12-03 20:50:30 +0000581.IR "" "Bart De Schuymer <" bdschuym@pandora.be >
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000582.SH SEE ALSO
583.BR iptables "(8), " brctl (8)