Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 1 | .TH EBTABLES 8 "26 June 2002" |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 2 | .\" |
| 3 | .\" Man page written by Bart De Schuymer <bart.de.schuymer@pandora.be> |
| 4 | .\" 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 |
fnm3 | f794d5a | 2002-06-14 17:28:13 +0000 | [diff] [blame] | 24 | ebtables (v.2.0) \- ethernet bridge packet table administration |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 25 | .SH SYNOPSIS |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 26 | .BR "ebtables -[ADI] " "chain rule-specification " [ options ] |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 27 | .br |
| 28 | .BR "ebtables -P " "chain target" |
| 29 | .br |
| 30 | .BR "ebtables -[FLZ] [" "chain" "]" |
| 31 | .br |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 32 | .BR "ebtables -[NX] " chain |
| 33 | .br |
| 34 | .BR "ebtables -E " "old-chain-name new-chain-name" |
| 35 | .br |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 36 | .B "ebtables -L DB" |
| 37 | .br |
| 38 | .BR "ebtables -[b] [" "y/n" "]" |
| 39 | .br |
Bart De Schuymer | a02773a | 2002-07-15 19:42:11 +0000 | [diff] [blame] | 40 | .BR "ebtables --init-table" |
| 41 | .br |
Bart De Schuymer | 234bce9 | 2002-07-14 21:25:08 +0000 | [diff] [blame] | 42 | .BR "ebtables --atomic-init " file |
| 43 | .br |
| 44 | .BR "ebtables --atomic-save " file |
| 45 | .br |
| 46 | .BR "ebtables --atomic-commit " file |
| 47 | .br |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 48 | .SH DESCRIPTION |
| 49 | .B ebtables |
| 50 | is used to set up, maintain, and inspect the tables of Ethernet frame |
| 51 | rules in the Linux kernel. It works analogous as iptables, but is less |
| 52 | complicated. This man page is written with the man page of iptables |
| 53 | next to it, so don't be surprised to see copied sentences and structure. |
| 54 | |
| 55 | There are three tables with built-in chains. Each chain is a list |
| 56 | of rules which can match frames: each rule specifies what to do with a |
| 57 | frame which matches. This is called a 'target'. The tables are used to |
| 58 | divide functionality into different sets of chains. |
| 59 | |
| 60 | .SS TARGETS |
| 61 | A firewall rule specifies criteria for a frame, and a target. If the |
| 62 | frame does not match, the next rule in the chain is the examined one; if |
| 63 | it does match, then the next thing to do is specified by the target. |
| 64 | This target can be one of these values: |
| 65 | .IR ACCEPT , |
| 66 | .IR DROP , |
| 67 | .IR CONTINUE , |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 68 | .IR RETURN , |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 69 | an extention. |
| 70 | .PP |
| 71 | .I ACCEPT |
| 72 | means to let the frame through. |
| 73 | .I DROP |
| 74 | means the frame has to be dropped. |
| 75 | .I CONTINUE |
| 76 | means the next rule has to be checked. This can be handy to know how many |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 77 | frames pass a certain point in the chain or to log those frames. |
| 78 | .I RETURN |
| 79 | means stop traversing this chain and resume at the next rule in the |
| 80 | previous (calling) chain. |
| 81 | For the |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 82 | other targets see the |
| 83 | .B "TARGET EXTENSIONS" |
| 84 | section. |
| 85 | .SS TABLES |
| 86 | There are three tables. |
| 87 | .TP |
| 88 | .B "-t, --table" |
| 89 | This option specifies the frame matching table which the command should |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 90 | operate on. If specified it should be the first option. The tables are: |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 91 | .BR filter , |
| 92 | this is the default table and contains three chains: |
| 93 | .B INPUT |
| 94 | (for frames destined for the bridge itself), |
| 95 | .B OUTPUT |
| 96 | (for locally-generated frames) and |
| 97 | .B FORWARD |
| 98 | (for frames being bridged). |
| 99 | .BR nat , |
| 100 | this table is used to change the mac addresses and contains three chains: |
| 101 | .B PREROUTING |
| 102 | (for altering frames as soon as they come in), |
| 103 | .B OUTPUT |
| 104 | (for altering locally generated frames before they are bridged) and |
| 105 | .B POSTROUTING |
| 106 | (for altering frames as they are about to go out). A small note on the naming |
| 107 | of chains POSTROUTING and PREROUTING: it would be more accurate to call them |
| 108 | PREFORWARDING and POSTFORWARDING, but for all those who come from the |
| 109 | .BR iptables " world to " ebtables |
| 110 | it is easier to have the same names. |
| 111 | .BR broute , |
| 112 | this table is used to make a brouter, it has one chain: |
| 113 | .BR BROUTING . |
| 114 | The targets |
| 115 | .BR DROP " and " ACCEPT |
| 116 | have special meaning in this table. |
| 117 | .B DROP |
| 118 | actually means the frame has to be routed, while |
| 119 | .B ACCEPT |
| 120 | means the frame has to be bridged. The |
| 121 | .B BROUTING |
| 122 | chain is traversed very early. It is only traversed by frames entering on |
| 123 | a bridge enslaved nic that is in forwarding state. Normally those frames |
| 124 | would be bridged, but you can decide otherwise here. The |
| 125 | .B redirect |
| 126 | target is very handy here. |
| 127 | .SH OPTIONS |
| 128 | The options can be divided into several different groups. |
| 129 | .SS COMMANDS |
| 130 | These options specify the specific actions to perform; only one of them |
| 131 | can be specified on the command line (the |
| 132 | .B -Z |
| 133 | command is an exception). All these options only apply to the selected |
| 134 | (or default) table. |
| 135 | .TP |
| 136 | .B "-A, --append" |
| 137 | Append a rule to the end of the selected chain. |
| 138 | .TP |
| 139 | .B "-D, --delete" |
| 140 | Delete the specified rule from the selected chain. There are two versions |
| 141 | of this command. A rule number (starting at 1) or the complete rule can be |
| 142 | specified. |
| 143 | .TP |
| 144 | .B "-I, --insert" |
| 145 | Insert the specified rule into the selected chain at the specified rule number (1 meaning |
| 146 | the head of the chain). |
| 147 | .TP |
| 148 | .B "-L, --list" |
| 149 | List all rules in the selected chain. If no chain is selected, all chains |
| 150 | are listed. If the chainname equals |
| 151 | .BR DB , |
| 152 | .B ebtables |
| 153 | will try to show the database. This database gives a survey of the kind of |
| 154 | frames that pass the different bridge hooks. It uses the interfaces where |
| 155 | the frame came in or will go out, the protocol field and the hook. This |
| 156 | database is independent from the rest of |
| 157 | .B ebtables |
| 158 | and is in a different kernel module. |
Bart De Schuymer | 234bce9 | 2002-07-14 21:25:08 +0000 | [diff] [blame] | 159 | .br |
| 160 | The following three options change the output when not listing the |
| 161 | database: |
| 162 | .br |
| 163 | .B "--Ln" |
| 164 | .br |
| 165 | Puts rule numbers in front of every rule. |
| 166 | .br |
| 167 | .B "--Lc" |
| 168 | .br |
| 169 | Puts the counter value at the end of every rule. |
| 170 | .br |
| 171 | .B "--Lx" |
| 172 | .br |
| 173 | The output is directly usable as executable commands in a script, to be |
| 174 | run f.e. at bootup. This option is incompatible with the previous two |
| 175 | options. When no chain name was specified for the |
| 176 | .B "-L" |
| 177 | command, all necessary commands for making the user defined chains and |
| 178 | renaming the standard chains will be made. |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 179 | .TP |
| 180 | .B "-F, --flush" |
| 181 | Flush the selected chain. If no chain is selected, every chain will be |
| 182 | flushed. This does not change the policy of the chain. |
| 183 | .TP |
Bart De Schuymer | a02773a | 2002-07-15 19:42:11 +0000 | [diff] [blame] | 184 | .B "--init-table" |
| 185 | Replace the current table data by the initial table data. |
| 186 | .TP |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 187 | .B "-Z, --zero" |
| 188 | Put the counters of the selected chain on zero. If no chain is selected, all the counters |
| 189 | are put on zero. This can be used in conjunction with the -L command (see above). |
| 190 | This will cause the rule counters to be printed on the screen before they are put on zero. |
| 191 | .TP |
| 192 | .B "-P, --policy" |
| 193 | Set the policy for the chain to the given target. The policy is either |
| 194 | .B ACCEPT |
| 195 | , either |
| 196 | .BR DROP . |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 197 | .TP |
| 198 | .B "-N, --new-chain" |
| 199 | Create a new user-defined chain by the given name. |
| 200 | .TP |
| 201 | .B "-X, --delete-chain" |
| 202 | Delete the specified user-defined chain. There must be no references to the |
| 203 | chain, |
| 204 | .B ebtables |
| 205 | will complain if there are. |
| 206 | .TP |
| 207 | .B "-E, --rename-chain" |
| 208 | Rename the specified chain to the new name. This has no effect on the |
| 209 | structure of the table. It is also allowed to rename a base chain, f.e. |
| 210 | if you like PREBRIDGING more than PREROUTING. Be sure to talk about the |
| 211 | standard chain names when you would ask a question on a mailing list. |
Bart De Schuymer | 234bce9 | 2002-07-14 21:25:08 +0000 | [diff] [blame] | 212 | .TP |
| 213 | .B "--atomic-init" |
Bart De Schuymer | a02773a | 2002-07-15 19:42:11 +0000 | [diff] [blame] | 214 | Copy the kernel's initial data of the table to the specified |
Bart De Schuymer | 234bce9 | 2002-07-14 21:25:08 +0000 | [diff] [blame] | 215 | file. This can be used as the first action, after which rules are added |
| 216 | to the file. |
| 217 | .TP |
| 218 | .B "--atomic-save" |
Bart De Schuymer | a02773a | 2002-07-15 19:42:11 +0000 | [diff] [blame] | 219 | Copy the kernel's current data of the table to the specified |
Bart De Schuymer | 234bce9 | 2002-07-14 21:25:08 +0000 | [diff] [blame] | 220 | file. This can be used as the first action, after which rules are added |
| 221 | to the file. |
| 222 | .TP |
| 223 | .B "--atomic-commit" |
| 224 | Replace the kernel table data with the data contained in the specified |
| 225 | file. This is a useful command that allows you to put all your rules of a |
| 226 | certain table into the kernel at once, saving the kernel a lot of precious |
| 227 | time. The file which contains the table data is constructed by using |
| 228 | either the |
| 229 | .B "--atomic-init" |
| 230 | or the |
| 231 | .B "--atomic-save" |
| 232 | command to get a starting file. After that, using the |
| 233 | .B "--atomic" |
| 234 | option when constructing rules allows you to extend the file and build up |
| 235 | the complete wanted table. |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 236 | .SS |
| 237 | PARAMETERS |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 238 | The following parameters make up a rule specification (as used in the add |
| 239 | and delete commands). A "!" argument before the specification inverts the |
| 240 | test for that specification. Apart from these standard parameters, there are others, see |
| 241 | .BR "MATCH EXTENSIONS" . |
| 242 | .TP |
| 243 | .BR "-p, --protocol " "[!] \fIprotocol\fP" |
| 244 | The protocol that was responsible for creating the frame. This can be a |
| 245 | hexadecimal number, above |
| 246 | .IR 0x0600 , |
| 247 | a name (e.g. |
| 248 | .I ARP |
| 249 | ) or |
| 250 | .BR LENGTH . |
| 251 | The protocol field of the Ethernet frame can be used to denote the |
| 252 | length of the header (802.2/802.3 networks). When the value of that field is |
| 253 | below (or equals) |
| 254 | .IR 0x0600 , |
| 255 | the value equals the size of the header and shouldn't be used as a |
| 256 | protocol number. Instead, all frames where the protocol field is used as |
| 257 | the length field are assumed to be of the same 'protocol'. The protocol |
| 258 | name used in |
| 259 | .B ebtables |
| 260 | for these frames is |
| 261 | .BR LENGTH . |
| 262 | .br |
| 263 | The file |
| 264 | .B /etc/ethertypes |
| 265 | can be used to show readable |
| 266 | characters instead of hexadecimal numbers for the protocols. For example, |
| 267 | .I 0x0800 |
| 268 | will be represented by |
| 269 | .IR IPV4 . |
| 270 | The use of this file is not case sensitive. |
| 271 | See that file for more information. The flag |
| 272 | .B --proto |
| 273 | is an alias for this option. |
| 274 | .TP |
| 275 | .BR "-i, --in-interface " "[!] \fIname\fP" |
| 276 | The interface via which a frame is received (for the |
| 277 | .BR INPUT , |
| 278 | .BR FORWARD , |
| 279 | .BR PREROUTING " and " BROUTING |
| 280 | chains). The flag |
| 281 | .B --in-if |
| 282 | is an alias for this option. |
| 283 | .TP |
| 284 | .BR "--logical-in " "[!] \fIname\fP" |
| 285 | The (logical) bridge interface via which a frame is received (for the |
| 286 | .BR INPUT , |
| 287 | .BR FORWARD , |
| 288 | .BR PREROUTING " and " BROUTING |
| 289 | chains). |
| 290 | .TP |
| 291 | .BR "-o, --out-interface " "[!] \fIname\fP" |
| 292 | The interface via which a frame is going to be sent (for the |
| 293 | .BR OUTPUT , |
| 294 | .B FORWARD |
| 295 | and |
| 296 | .B POSTROUTING |
| 297 | chains). The flag |
| 298 | .B --out-if |
| 299 | is an alias for this option. |
| 300 | .TP |
| 301 | .BR "--logical-out " "[!] \fIname\fP" |
| 302 | The (logical) bridge interface via which a frame is going to be sent (for |
| 303 | the |
| 304 | .BR OUTPUT , |
| 305 | .B FORWARD |
| 306 | and |
| 307 | .B POSTROUTING |
| 308 | chains). |
| 309 | .TP |
| 310 | .BR "-s, --source " "[!] \fIaddress\fP[/\fImask\fP]" |
| 311 | The source mac address. Both mask and address are written as 6 hexadecimal |
| 312 | numbers seperated by colons. Alternatively one can specify Unicast, |
| 313 | Multicast or Broadcast. |
| 314 | .br |
| 315 | Unicast=00:00:00:00:00:00/01:00:00:00:00:00, |
| 316 | Multicast=01:00:00:00:00:00/01:00:00:00:00:00 and |
| 317 | Broadcast=ff:ff:ff:ff:ff:ff/ff:ff:ff:ff:ff:ff. Note that a broadcast |
| 318 | address will also match the multicast specification. The flag |
| 319 | .B --src |
| 320 | is an alias for this option. |
| 321 | .TP |
| 322 | .BR "-d, --destination " "[!] \fIaddress\fP[/\fImask\fP]" |
| 323 | The destination mac address. See -s (above) for more details. The flag |
| 324 | .B --dst |
| 325 | is an alias for this option. |
| 326 | |
| 327 | .SS OTHER OPTIONS |
| 328 | .TP |
| 329 | .B "-V, --version" |
| 330 | Show the version of the userprogram. |
| 331 | .TP |
| 332 | .B "-h, --help" |
| 333 | Give a brief description of the command syntax. Here you can also specify |
| 334 | names of extensions and |
| 335 | .B ebtables |
| 336 | will try to write help about those extensions. E.g. ebtables -h snat log ip arp. |
| 337 | .TP |
Bart De Schuymer | 234bce9 | 2002-07-14 21:25:08 +0000 | [diff] [blame] | 338 | .BR "-b --db [" "y/n" "]" |
| 339 | Enable (y) or disable (n) the database. |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 340 | .TP |
| 341 | .BR "-j, --jump " "\fItarget\fP" |
| 342 | The target of the rule. This is one of the following values: |
| 343 | .BR ACCEPT , |
| 344 | .BR DROP , |
| 345 | .BR CONTINUE , |
| 346 | or a target extension, see |
| 347 | .BR "TARGET EXTENSIONS" . |
Bart De Schuymer | 86fe860 | 2002-06-15 08:16:41 +0000 | [diff] [blame] | 348 | .TP |
Bart De Schuymer | 234bce9 | 2002-07-14 21:25:08 +0000 | [diff] [blame] | 349 | .BR "--atomic " file |
| 350 | Let the command operate on the specified file. The data of the table to |
| 351 | operate on will be extracted from the file and the result of the operation |
| 352 | will be saved back into the file. If specified, this option should come |
| 353 | before the command specification. |
| 354 | .TP |
| 355 | .BR "-M, --modprobe " "program" |
| 356 | When talking to the kernel, use this program to try to automatically load |
| 357 | missing kernel modules. |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 358 | .SH MATCH EXTENSIONS |
| 359 | .B ebtables |
| 360 | extensions are precompiled into the userspace tool. So there is no need |
| 361 | to explicitly load them with a -m option like in iptables. However, these |
| 362 | extensions deal with functionality supported by supplemental kernel modules. |
| 363 | .SS ip |
| 364 | Specify ip specific fields. These will only work if the protocol equals |
| 365 | .BR IPv4 . |
| 366 | .TP |
| 367 | .BR "--ip-source " "[!] \fIaddress\fP[/\fImask\fP]" |
| 368 | The source ip address. |
| 369 | The flag |
| 370 | .B --ip-src |
| 371 | is an alias for this option. |
| 372 | .TP |
| 373 | .BR "--ip-destination " "[!] \fIaddress\fP[/\fImask\fP]" |
| 374 | The destination ip address. |
| 375 | The flag |
| 376 | .B --ip-dst |
| 377 | is an alias for this option. |
| 378 | .TP |
| 379 | .BR "--ip-tos " "[!] \fItos\fP" |
| 380 | The ip type of service, in hexadecimal numbers. |
| 381 | .BR IPv4 . |
| 382 | .TP |
| 383 | .BR "--ip-protocol " "[!] \fIprotocol\fP" |
| 384 | The ip protocol. |
| 385 | The flag |
| 386 | .B --ip-proto |
| 387 | is an alias for this option. |
| 388 | .SS arp |
| 389 | Specify arp specific fields. These will only work if the protocol equals |
| 390 | .BR ARP " or " RARP . |
| 391 | .TP |
| 392 | .BR "--arp-opcode " "[!] \fIopcode\fP" |
| 393 | The (r)arp opcode (decimal or a string, for more details see ebtables -h arp). |
| 394 | .TP |
| 395 | .BR "--arp-htype " "[!] \fIhardware type\fP" |
| 396 | The hardware type, this can be a decimal or the string "Ethernet". This |
| 397 | is normally Ethernet (value 1). |
| 398 | .TP |
| 399 | .BR "--arp-ptype " "[!] \fIprotocol type\fP" |
| 400 | The protocol type for which the (r)arp is used (hexadecimal or the string "IPv4"). |
| 401 | This is normally IPv4 (0x0800). |
| 402 | .TP |
| 403 | .BR "--arp-ip-src " "[!] \fIaddress\fP[/\fImask\fP]" |
| 404 | The ARP IP source address specification. |
| 405 | .TP |
| 406 | .BR "--arp-ip-dst " "[!] \fIaddress\fP[/\fImask\fP]" |
| 407 | The ARP IP destination address specification. |
| 408 | .SS vlan |
fnm3 | f794d5a | 2002-06-14 17:28:13 +0000 | [diff] [blame] | 409 | Specify 802.1Q Tag Control Information fields. These will only work if the protocol equals |
fnm3 | ed7e901 | 2002-06-25 16:43:23 +0000 | [diff] [blame] | 410 | .BR 802_1Q. |
| 411 | Also see extension help by |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 412 | .BR "ebtables -h vlan" . |
| 413 | .TP |
| 414 | .BR "--vlan-id " "[!] \fIid\fP" |
fnm3 | ed7e901 | 2002-06-25 16:43:23 +0000 | [diff] [blame] | 415 | The VLAN identifier field, VID (decimal number from 0 to 4094). |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 416 | .TP |
| 417 | .BR "--vlan-prio " "[!] \fIprio\fP" |
fnm3 | ed7e901 | 2002-06-25 16:43:23 +0000 | [diff] [blame] | 418 | The user_priority field, this can be a decimal number from 0 to 7. |
| 419 | Required VID to be 0 (null VID) or not specified vlan-id parameter (in this case VID deliberately be set to 0). |
fnm3 | f794d5a | 2002-06-14 17:28:13 +0000 | [diff] [blame] | 420 | .TP |
fnm3 | ed7e901 | 2002-06-25 16:43:23 +0000 | [diff] [blame] | 421 | .BR "--vlan-encap " "[!] \fItype\fP" |
| 422 | The encapsulated ethernet frame type/length, this can be a hexadecimal number from 0x0000 to 0xFFFF. |
| 423 | Usually it's 0x0800 (IPv4). See also |
| 424 | .B /etc/ethertypes |
| 425 | file. |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 426 | .SH WATCHER EXTENSION(S) |
| 427 | Watchers are things that only look at frames passing by. These watchers only see the |
| 428 | frame if the frame passes all the matches of the rule. |
| 429 | .SS log |
| 430 | The fact that the log module is a watcher lets us log stuff while giving a target |
| 431 | by choice. Note that the log module therefore is not a target. |
| 432 | .TP |
| 433 | .B "--log" |
| 434 | .br |
| 435 | Use this if you won't specify any other log options, so if you want to use the default |
| 436 | settings: log-prefix="", no arp logging, no ip logging, log-level=info. |
| 437 | .TP |
| 438 | .B --log-level "\fIlevel\fP" |
| 439 | .br |
| 440 | defines the logging level. For the possible values: ebtables -h log. |
| 441 | The default level is |
| 442 | .IR info . |
| 443 | .TP |
| 444 | .BR --log-prefix " \fItext\fP" |
| 445 | .br |
| 446 | defines the prefix to be printed before the logging information. |
| 447 | .TP |
| 448 | .B --log-ip |
| 449 | .br |
| 450 | will log the ip information when a frame made by the ip protocol matches |
| 451 | the rule. The default is no ip information logging. |
| 452 | .TP |
| 453 | .B --log-arp |
| 454 | .br |
| 455 | will log the (r)arp information when a frame made by the (r)arp protocols |
| 456 | matches the rule. The default is no (r)arp information logging. |
| 457 | .SS TARGET EXTENSIONS |
| 458 | .TP |
| 459 | .B snat |
| 460 | The |
| 461 | .B snat |
| 462 | target can only be used in the |
| 463 | .BR POSTROUTING " chain of the " nat " table." |
| 464 | It specifies that the source mac address has to be changed. |
| 465 | .br |
| 466 | .BR "--to-source " "\fIaddress\fP" |
| 467 | .br |
| 468 | The flag |
| 469 | .B --to-src |
| 470 | is an alias for this option. |
| 471 | .br |
| 472 | .BR "--snat-target " "\fItarget\fP" |
| 473 | .br |
| 474 | Specifies the standard target. After doing the snat, the rule still has |
| 475 | to give a standard target so |
| 476 | .B ebtables |
| 477 | knows what to do. |
| 478 | The default target is ACCEPT. Making it CONTINUE could let you use |
| 479 | multiple target extensions on the same frame. Making it DROP doesn't |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 480 | make sense, but you could do that too. RETURN is also allowed. Note |
| 481 | that using RETURN in a base chain will result in the CONTINUE behaviour. |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 482 | .TP |
| 483 | .B dnat |
| 484 | The |
| 485 | .B dnat |
| 486 | target can only be used in the |
| 487 | .BR BROUTING " chain of the " broute " table and the " |
| 488 | .BR PREROUTING " and " OUTPUT " chains of the " nat " table." |
| 489 | It specifies that the destination mac address has to be changed. |
| 490 | .br |
| 491 | .BR "--to-destination " "\fIaddress\fP" |
| 492 | .br |
| 493 | The flag |
| 494 | .B --to-dst |
| 495 | is an alias for this option. |
| 496 | .br |
| 497 | .BR "--dnat-target " "\fItarget\fP" |
| 498 | .br |
| 499 | Specifies the standard target. After doing the dnat, the rule still has to |
| 500 | give a standard target so |
| 501 | .B ebtables |
| 502 | knows what to do. |
| 503 | The default target is ACCEPT. Making it CONTINUE could let you use |
| 504 | multiple target extensions on the same frame. Making it DROP only makes |
| 505 | sense in the BROUTING chain but using the redirect target is more logical |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 506 | there. RETURN is also allowed. Note |
| 507 | that using RETURN in a base chain will result in the CONTINUE behaviour. |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 508 | .TP |
| 509 | .B redirect |
| 510 | The |
| 511 | .B redirect |
| 512 | target will change the MAC target address to that of the bridge device the |
| 513 | frame arrived on. This target can only be used in the |
| 514 | .BR BROUTING " chain of the " broute " table and the " |
| 515 | .BR PREROUTING " chain of the " nat " table." |
| 516 | .br |
| 517 | .BR "--redirect-target " "\fItarget\fP" |
| 518 | .br |
| 519 | Specifies the standard target. After doing the MAC redirect, the rule |
| 520 | still has to give a standard target so |
| 521 | .B ebtables |
| 522 | knows what to do. |
| 523 | The default target is ACCEPT. Making it CONTINUE could let you use |
| 524 | multiple target extensions on the same frame. Making it DROP in the |
Bart De Schuymer | 29749c6 | 2002-06-25 21:27:57 +0000 | [diff] [blame] | 525 | BROUTING chain will let the frames be routed. RETURN is also allowed. Note |
| 526 | that using RETURN in a base chain will result in the CONTINUE behaviour. |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 527 | .SH FILES |
| 528 | .I /etc/ethertypes |
| 529 | .SH BUGS |
| 530 | This won't work on an architecture with a user32/kernel64 situation like the Sparc64. |
| 531 | .SH AUTHOR |
| 532 | .IR "" "Bart De Schuymer <" bart.de.schuymer@pandora.be > |
| 533 | .SH SEE ALSO |
| 534 | .BR iptables "(8), " brctl (8) |