blob: 6247253c1a951daa8c56c5cc24edf0b0efa8a36e [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"
182Set the policy for the chain to the given target. The policy is either
183.B ACCEPT
184, either
185.BR DROP .
Bart De Schuymer29749c62002-06-25 21:27:57 +0000186.TP
187.B "-N, --new-chain"
Bart De Schuymer63e2c702002-08-01 15:30:15 +0000188Create a new user-defined chain by the given name. The number of
189user-defined chains is unlimited. A chain name has max length of 31.
Bart De Schuymer29749c62002-06-25 21:27:57 +0000190.TP
191.B "-X, --delete-chain"
192Delete the specified user-defined chain. There must be no references to the
193chain,
194.B ebtables
195will complain if there are.
196.TP
197.B "-E, --rename-chain"
198Rename the specified chain to the new name. This has no effect on the
199structure of the table. It is also allowed to rename a base chain, f.e.
200if you like PREBRIDGING more than PREROUTING. Be sure to talk about the
201standard chain names when you would ask a question on a mailing list.
Bart De Schuymer234bce92002-07-14 21:25:08 +0000202.TP
203.B "--atomic-init"
Bart De Schuymera02773a2002-07-15 19:42:11 +0000204Copy the kernel's initial data of the table to the specified
Bart De Schuymer234bce92002-07-14 21:25:08 +0000205file. This can be used as the first action, after which rules are added
Bart De Schuymereecff422002-12-03 20:50:30 +0000206to the file. The file can be specified using the
207.B --atomic-file
208option or through the
209.IR EBTABLES_ATOMIC_FILE " environment variable."
Bart De Schuymer234bce92002-07-14 21:25:08 +0000210.TP
211.B "--atomic-save"
Bart De Schuymera02773a2002-07-15 19:42:11 +0000212Copy the kernel's current data of the table to the specified
Bart De Schuymer234bce92002-07-14 21:25:08 +0000213file. This can be used as the first action, after which rules are added
Bart De Schuymereecff422002-12-03 20:50:30 +0000214to the file. The file can be specified using the
215.B --atomic-file
216option or through the
217.IR EBTABLES_ATOMIC_FILE " environment variable."
Bart De Schuymer234bce92002-07-14 21:25:08 +0000218.TP
219.B "--atomic-commit"
220Replace the kernel table data with the data contained in the specified
221file. This is a useful command that allows you to put all your rules of a
222certain table into the kernel at once, saving the kernel a lot of precious
Bart De Schuymereecff422002-12-03 20:50:30 +0000223time and allowing atomic updates of the tables. The file which contains
224the table data is constructed by using either the
Bart De Schuymer234bce92002-07-14 21:25:08 +0000225.B "--atomic-init"
226or the
227.B "--atomic-save"
228command to get a starting file. After that, using the
Bart De Schuymereecff422002-12-03 20:50:30 +0000229.B "--atomic-file"
230option when constructing rules or setting the
231.IR EBTABLES_ATOMIC_FILE " environment variable"
232allows you to extend the file and build the complete table before
233commiting it to the kernel.
Bart De Schuymer29749c62002-06-25 21:27:57 +0000234.SS
235PARAMETERS
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000236The following parameters make up a rule specification (as used in the add
237and delete commands). A "!" argument before the specification inverts the
238test for that specification. Apart from these standard parameters, there are others, see
239.BR "MATCH EXTENSIONS" .
240.TP
241.BR "-p, --protocol " "[!] \fIprotocol\fP"
242The protocol that was responsible for creating the frame. This can be a
243hexadecimal number, above
244.IR 0x0600 ,
245a name (e.g.
246.I ARP
247) or
248.BR LENGTH .
249The protocol field of the Ethernet frame can be used to denote the
250length of the header (802.2/802.3 networks). When the value of that field is
251below (or equals)
252.IR 0x0600 ,
253the value equals the size of the header and shouldn't be used as a
254protocol number. Instead, all frames where the protocol field is used as
255the length field are assumed to be of the same 'protocol'. The protocol
256name used in
257.B ebtables
258for these frames is
259.BR LENGTH .
260.br
261The file
262.B /etc/ethertypes
263can be used to show readable
264characters instead of hexadecimal numbers for the protocols. For example,
265.I 0x0800
266will be represented by
267.IR IPV4 .
268The use of this file is not case sensitive.
269See that file for more information. The flag
270.B --proto
271is an alias for this option.
272.TP
273.BR "-i, --in-interface " "[!] \fIname\fP"
274The interface via which a frame is received (for the
275.BR INPUT ,
276.BR FORWARD ,
277.BR PREROUTING " and " BROUTING
278chains). The flag
279.B --in-if
280is an alias for this option.
281.TP
282.BR "--logical-in " "[!] \fIname\fP"
283The (logical) bridge interface via which a frame is received (for the
284.BR INPUT ,
285.BR FORWARD ,
286.BR PREROUTING " and " BROUTING
287chains).
288.TP
289.BR "-o, --out-interface " "[!] \fIname\fP"
290The interface via which a frame is going to be sent (for the
291.BR OUTPUT ,
292.B FORWARD
293and
294.B POSTROUTING
295chains). The flag
296.B --out-if
297is an alias for this option.
298.TP
299.BR "--logical-out " "[!] \fIname\fP"
300The (logical) bridge interface via which a frame is going to be sent (for
301the
302.BR OUTPUT ,
303.B FORWARD
304and
305.B POSTROUTING
306chains).
307.TP
308.BR "-s, --source " "[!] \fIaddress\fP[/\fImask\fP]"
309The source mac address. Both mask and address are written as 6 hexadecimal
310numbers seperated by colons. Alternatively one can specify Unicast,
311Multicast or Broadcast.
312.br
313Unicast=00:00:00:00:00:00/01:00:00:00:00:00,
314Multicast=01:00:00:00:00:00/01:00:00:00:00:00 and
315Broadcast=ff:ff:ff:ff:ff:ff/ff:ff:ff:ff:ff:ff. Note that a broadcast
316address will also match the multicast specification. The flag
317.B --src
318is an alias for this option.
319.TP
320.BR "-d, --destination " "[!] \fIaddress\fP[/\fImask\fP]"
321The destination mac address. See -s (above) for more details. The flag
322.B --dst
323is an alias for this option.
324
325.SS OTHER OPTIONS
326.TP
327.B "-V, --version"
328Show the version of the userprogram.
329.TP
330.B "-h, --help"
331Give a brief description of the command syntax. Here you can also specify
332names of extensions and
333.B ebtables
334will try to write help about those extensions. E.g. ebtables -h snat log ip arp.
335.TP
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000336.BR "-j, --jump " "\fItarget\fP"
337The target of the rule. This is one of the following values:
338.BR ACCEPT ,
339.BR DROP ,
340.BR CONTINUE ,
Bart De Schuymer63e2c702002-08-01 15:30:15 +0000341.BR RETURN ,
342a target extension (see
343.BR "TARGET EXTENSIONS" ")"
344or a user defined chain name.
Bart De Schuymer86fe8602002-06-15 08:16:41 +0000345.TP
Bart De Schuymereecff422002-12-03 20:50:30 +0000346.B --atomic-file file
Bart De Schuymer234bce92002-07-14 21:25:08 +0000347Let the command operate on the specified file. The data of the table to
348operate on will be extracted from the file and the result of the operation
349will be saved back into the file. If specified, this option should come
Bart De Schuymereecff422002-12-03 20:50:30 +0000350before the command specification. An alternative that should be preferred,
351is setting the
352.BR EBTABLES_ATOMIC_FILE "environment variable."
Bart De Schuymer234bce92002-07-14 21:25:08 +0000353.TP
Bart De Schuymer2ac6b742002-07-20 16:14:38 +0000354.B -M, --modprobe program
Bart De Schuymer234bce92002-07-14 21:25:08 +0000355When talking to the kernel, use this program to try to automatically load
356missing kernel modules.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000357.SH MATCH EXTENSIONS
358.B ebtables
359extensions are precompiled into the userspace tool. So there is no need
360to explicitly load them with a -m option like in iptables. However, these
361extensions deal with functionality supported by supplemental kernel modules.
362.SS ip
363Specify ip specific fields. These will only work if the protocol equals
364.BR IPv4 .
365.TP
366.BR "--ip-source " "[!] \fIaddress\fP[/\fImask\fP]"
367The source ip address.
368The flag
369.B --ip-src
370is an alias for this option.
371.TP
372.BR "--ip-destination " "[!] \fIaddress\fP[/\fImask\fP]"
373The destination ip address.
374The flag
375.B --ip-dst
376is an alias for this option.
377.TP
378.BR "--ip-tos " "[!] \fItos\fP"
379The ip type of service, in hexadecimal numbers.
380.BR IPv4 .
381.TP
382.BR "--ip-protocol " "[!] \fIprotocol\fP"
383The ip protocol.
384The flag
385.B --ip-proto
386is an alias for this option.
Bart De Schuymer4883ba52002-09-19 21:10:45 +0000387.TP
388.BR "--ip-source-port " "[!] \fIport\fP[:\fIport\fP]"
389The source port or port range for the ip protocols 6 (TCP) and 17
390(UDP). If the first port is omitted, "0" is assumed; if the last
391is omitted, "65535" is assumed. The flag
392.B --ip-sport
393is an alias for this option.
394.TP
395.BR "--ip-destination-port " "[!] \fIport\fP[:\fIport\fP]"
396The destination port or port range for ip protocols 6 (TCP) and
39717 (UDP). The flag
398.B --ip-dport
399is an alias for this option.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000400.SS arp
401Specify arp specific fields. These will only work if the protocol equals
402.BR ARP " or " RARP .
403.TP
404.BR "--arp-opcode " "[!] \fIopcode\fP"
Bart De Schuymer9553d9c2002-07-23 21:13:05 +0000405The (r)arp opcode (decimal or a string, for more details see
406.BR "ebtables -h arp" ).
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000407.TP
408.BR "--arp-htype " "[!] \fIhardware type\fP"
409The hardware type, this can be a decimal or the string "Ethernet". This
410is normally Ethernet (value 1).
411.TP
412.BR "--arp-ptype " "[!] \fIprotocol type\fP"
413The protocol type for which the (r)arp is used (hexadecimal or the string "IPv4").
414This is normally IPv4 (0x0800).
415.TP
416.BR "--arp-ip-src " "[!] \fIaddress\fP[/\fImask\fP]"
417The ARP IP source address specification.
418.TP
419.BR "--arp-ip-dst " "[!] \fIaddress\fP[/\fImask\fP]"
420The ARP IP destination address specification.
421.SS vlan
fnm3f794d5a2002-06-14 17:28:13 +0000422Specify 802.1Q Tag Control Information fields. These will only work if the protocol equals
fnm3ed7e9012002-06-25 16:43:23 +0000423.BR 802_1Q.
424Also see extension help by
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000425.BR "ebtables -h vlan" .
426.TP
427.BR "--vlan-id " "[!] \fIid\fP"
fnm3ed7e9012002-06-25 16:43:23 +0000428The VLAN identifier field, VID (decimal number from 0 to 4094).
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000429.TP
430.BR "--vlan-prio " "[!] \fIprio\fP"
fnm3ed7e9012002-06-25 16:43:23 +0000431The user_priority field, this can be a decimal number from 0 to 7.
432Required 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 +0000433.TP
fnm3ed7e9012002-06-25 16:43:23 +0000434.BR "--vlan-encap " "[!] \fItype\fP"
Bart De Schuymer9553d9c2002-07-23 21:13:05 +0000435The encapsulated Ethernet frame type/length, this can be a hexadecimal
436number from 0x0000 to 0xFFFF.
fnm3ed7e9012002-06-25 16:43:23 +0000437Usually it's 0x0800 (IPv4). See also
438.B /etc/ethertypes
439file.
Bart De Schuymer2ac6b742002-07-20 16:14:38 +0000440.SS mark_m
441.TP
Bart De Schuymer8a8ca612002-07-21 15:18:07 +0000442.BR "--mark " "[!] [\fIvalue\fP][/\fImask\fP]"
443Matches frames with the given unsigned mark value. If a mark value and
444mask is specified, the logical AND of the mark value of the frame and
445the user specified mask is taken before comparing with the user specified
446mark value. If only a mask is specified (start with '/') the logical AND
447of the mark value of the frame and the user specified mark is taken and
448the result is compared with zero.
Bart De Schuymer2ac6b742002-07-20 16:14:38 +0000449
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000450.SH WATCHER EXTENSION(S)
Bart De Schuymer9553d9c2002-07-23 21:13:05 +0000451Watchers are things that only look at frames passing by. These watchers only
452see the frame if the frame passes all the matches of the rule.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000453.SS log
454The fact that the log module is a watcher lets us log stuff while giving a target
455by choice. Note that the log module therefore is not a target.
456.TP
457.B "--log"
458.br
459Use this if you won't specify any other log options, so if you want to use the default
460settings: log-prefix="", no arp logging, no ip logging, log-level=info.
461.TP
462.B --log-level "\fIlevel\fP"
463.br
464defines the logging level. For the possible values: ebtables -h log.
465The default level is
466.IR info .
467.TP
468.BR --log-prefix " \fItext\fP"
469.br
470defines the prefix to be printed before the logging information.
471.TP
472.B --log-ip
473.br
474will log the ip information when a frame made by the ip protocol matches
475the rule. The default is no ip information logging.
476.TP
477.B --log-arp
478.br
479will log the (r)arp information when a frame made by the (r)arp protocols
480matches the rule. The default is no (r)arp information logging.
481.SS TARGET EXTENSIONS
482.TP
483.B snat
484The
485.B snat
486target can only be used in the
487.BR POSTROUTING " chain of the " nat " table."
488It specifies that the source mac address has to be changed.
489.br
490.BR "--to-source " "\fIaddress\fP"
491.br
492The flag
493.B --to-src
494is an alias for this option.
495.br
496.BR "--snat-target " "\fItarget\fP"
497.br
498Specifies the standard target. After doing the snat, the rule still has
499to give a standard target so
500.B ebtables
501knows what to do.
502The default target is ACCEPT. Making it CONTINUE could let you use
503multiple target extensions on the same frame. Making it DROP doesn't
Bart De Schuymer29749c62002-06-25 21:27:57 +0000504make sense, but you could do that too. RETURN is also allowed. Note
Bart De Schuymer4c4447d2002-07-25 14:55:14 +0000505that using RETURN in a base chain is not allowed.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000506.TP
507.B dnat
508The
509.B dnat
510target can only be used in the
511.BR BROUTING " chain of the " broute " table and the "
512.BR PREROUTING " and " OUTPUT " chains of the " nat " table."
513It specifies that the destination mac address has to be changed.
514.br
515.BR "--to-destination " "\fIaddress\fP"
516.br
517The flag
518.B --to-dst
519is an alias for this option.
520.br
521.BR "--dnat-target " "\fItarget\fP"
522.br
523Specifies the standard target. After doing the dnat, the rule still has to
524give a standard target so
525.B ebtables
526knows what to do.
527The default target is ACCEPT. Making it CONTINUE could let you use
528multiple target extensions on the same frame. Making it DROP only makes
529sense in the BROUTING chain but using the redirect target is more logical
Bart De Schuymer29749c62002-06-25 21:27:57 +0000530there. RETURN is also allowed. Note
Bart De Schuymer4c4447d2002-07-25 14:55:14 +0000531that using RETURN in a base chain is not allowed.
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000532.TP
533.B redirect
534The
535.B redirect
536target will change the MAC target address to that of the bridge device the
537frame arrived on. This target can only be used in the
538.BR BROUTING " chain of the " broute " table and the "
539.BR PREROUTING " chain of the " nat " table."
540.br
541.BR "--redirect-target " "\fItarget\fP"
542.br
543Specifies the standard target. After doing the MAC redirect, the rule
544still has to give a standard target so
545.B ebtables
546knows what to do.
547The default target is ACCEPT. Making it CONTINUE could let you use
548multiple target extensions on the same frame. Making it DROP in the
Bart De Schuymer29749c62002-06-25 21:27:57 +0000549BROUTING chain will let the frames be routed. RETURN is also allowed. Note
Bart De Schuymer4c4447d2002-07-25 14:55:14 +0000550that using RETURN in a base chain is not allowed.
Bart De Schuymer2ac6b742002-07-20 16:14:38 +0000551.TP
552.B mark
553The mark target can be used in every chain of every table. It is possible
554to use the marking of a frame/packet in both ebtables and iptables,
555if the br-nf code is compiled into the kernel. Both put the marking at the
556same place. So, you can consider this fact as a feature, or as something to
557watch out for.
558.br
559.BR "--mark-target " "\fItarget\fP"
560.br
561Specifies the standard target. After marking the frame, the rule
562still has to give a standard target so
563.B ebtables
564knows what to do.
565The default target is ACCEPT. Making it CONTINUE can let you do other
566things with the frame in other rules of the chain.
567.br
568.BR "--set-mark " "\fIvalue\fP"
569.br
570Mark the frame with the specified unsigned value.
571.br
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000572.SH FILES
573.I /etc/ethertypes
Bart De Schuymereecff422002-12-03 20:50:30 +0000574.SH ENVIRONMENT VARIABLES
575.I EBTABLES_ATOMIC_FILE
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000576.SH BUGS
577This won't work on an architecture with a user32/kernel64 situation like the Sparc64.
578.SH AUTHOR
Bart De Schuymereecff422002-12-03 20:50:30 +0000579.IR "" "Bart De Schuymer <" bdschuym@pandora.be >
Bart De Schuymer1abc55d2002-06-01 19:23:47 +0000580.SH SEE ALSO
581.BR iptables "(8), " brctl (8)