| 1 |
'\" t |
| 2 |
.TH IP\-XFRM 8 "20 Dec 2011" "iproute2" "Linux" |
| 3 |
.SH "NAME" |
| 4 |
ip-xfrm \- transform configuration |
| 5 |
.SH "SYNOPSIS" |
| 6 |
.sp |
| 7 |
.ad l |
| 8 |
.in +8 |
| 9 |
.ti -8 |
| 10 |
.B ip |
| 11 |
.RI "[ " OPTIONS " ]" |
| 12 |
.B xfrm |
| 13 |
.RI " { " COMMAND " | " |
| 14 |
.BR help " }" |
| 15 |
.sp |
| 16 |
|
| 17 |
.ti -8 |
| 18 |
.B "ip xfrm" |
| 19 |
.IR XFRM-OBJECT " { " COMMAND " | " |
| 20 |
.BR help " }" |
| 21 |
.sp |
| 22 |
|
| 23 |
.ti -8 |
| 24 |
.IR XFRM-OBJECT " :=" |
| 25 |
.BR state " | " policy " | " monitor |
| 26 |
.sp |
| 27 |
|
| 28 |
.ti -8 |
| 29 |
.BR "ip xfrm state" " { " add " | " update " } " |
| 30 |
.IR ID " [ " ALGO-LIST " ]" |
| 31 |
.RB "[ " mode |
| 32 |
.IR MODE " ]" |
| 33 |
.RB "[ " mark |
| 34 |
.I MARK |
| 35 |
.RB "[ " mask |
| 36 |
.IR MASK " ] ]" |
| 37 |
.RB "[ " reqid |
| 38 |
.IR REQID " ]" |
| 39 |
.RB "[ " dir |
| 40 |
.IR SA-DIR " ]" |
| 41 |
.RB "[ " seq |
| 42 |
.IR SEQ " ]" |
| 43 |
.RB "[ " replay-window |
| 44 |
.IR SIZE " ]" |
| 45 |
.RB "[ " replay-seq |
| 46 |
.IR SEQ " ]" |
| 47 |
.RB "[ " replay-oseq |
| 48 |
.IR SEQ " ]" |
| 49 |
.RB "[ " replay-seq-hi |
| 50 |
.IR SEQ " ]" |
| 51 |
.RB "[ " replay-oseq-hi |
| 52 |
.IR SEQ " ]" |
| 53 |
.RB "[ " flag |
| 54 |
.IR FLAG-LIST " ]" |
| 55 |
.RB "[ " sel |
| 56 |
.IR SELECTOR " ] [ " LIMIT-LIST " ]" |
| 57 |
.RB "[ " encap |
| 58 |
.IR ENCAP " ]" |
| 59 |
.RB "[ " coa |
| 60 |
.IR ADDR "[/" PLEN "] ]" |
| 61 |
.RB "[ " ctx |
| 62 |
.IR CTX " ]" |
| 63 |
.RB "[ " extra-flag |
| 64 |
.IR EXTRA-FLAG-LIST " ]" |
| 65 |
.RB "[ " output-mark |
| 66 |
.IR OUTPUT-MARK |
| 67 |
.RB "[ " mask |
| 68 |
.IR MASK " ] ]" |
| 69 |
.RB "[ " if_id |
| 70 |
.IR IF-ID " ]" |
| 71 |
.RB "[ " offload |
| 72 |
.RB "[ " crypto | packet " ]" |
| 73 |
.RB dev |
| 74 |
.I DEV |
| 75 |
.RB dir |
| 76 |
.IR DIR " ]" |
| 77 |
.RB "[ " tfcpad |
| 78 |
.IR LENGTH " ]" |
| 79 |
.RB "[ " pcpu-num |
| 80 |
.IR CPUNUM " ]" |
| 81 |
|
| 82 |
.ti -8 |
| 83 |
.B "ip xfrm state allocspi" |
| 84 |
.I ID |
| 85 |
.RB "[ " mode |
| 86 |
.IR MODE " ]" |
| 87 |
.RB "[ " mark |
| 88 |
.I MARK |
| 89 |
.RB "[ " mask |
| 90 |
.IR MASK " ] ]" |
| 91 |
.RB "[ " reqid |
| 92 |
.IR REQID " ]" |
| 93 |
.RB "[ " seq |
| 94 |
.IR SEQ " ]" |
| 95 |
.RB "[ " min |
| 96 |
.I SPI |
| 97 |
.B max |
| 98 |
.IR SPI " ]" |
| 99 |
.RB "[ " pcpu-num |
| 100 |
.IR CPUNUM " ]" |
| 101 |
|
| 102 |
.ti -8 |
| 103 |
.BR "ip xfrm state" " { " delete " | " get " } " |
| 104 |
.I ID |
| 105 |
.RB "[ " mark |
| 106 |
.I MARK |
| 107 |
.RB "[ " mask |
| 108 |
.IR MASK " ] ]" |
| 109 |
|
| 110 |
.ti -8 |
| 111 |
.BR ip " [ " -4 " | " -6 " ] " "xfrm state deleteall" " [" |
| 112 |
.IR ID " ]" |
| 113 |
.RB "[ " mode |
| 114 |
.IR MODE " ]" |
| 115 |
.RB "[ " reqid |
| 116 |
.IR REQID " ]" |
| 117 |
.RB "[ " flag |
| 118 |
.IR FLAG-LIST " ]" |
| 119 |
|
| 120 |
.ti -8 |
| 121 |
.BR ip " [ " -4 " | " -6 " ] " "xfrm state list" " [" |
| 122 |
.IR ID " ]" |
| 123 |
.RB "[ " nokeys " ]" |
| 124 |
.RB "[ " mode |
| 125 |
.IR MODE " ]" |
| 126 |
.RB "[ " reqid |
| 127 |
.IR REQID " ]" |
| 128 |
.RB "[ " flag |
| 129 |
.IR FLAG-LIST " ]" |
| 130 |
|
| 131 |
.ti -8 |
| 132 |
.BR "ip xfrm state flush" " [ " proto |
| 133 |
.IR XFRM-PROTO " ]" |
| 134 |
|
| 135 |
.ti -8 |
| 136 |
.BR "ip xfrm state count" |
| 137 |
|
| 138 |
.ti -8 |
| 139 |
.IR ID " :=" |
| 140 |
.RB "[ " src |
| 141 |
.IR ADDR " ]" |
| 142 |
.RB "[ " dst |
| 143 |
.IR ADDR " ]" |
| 144 |
.RB "[ " proto |
| 145 |
.IR XFRM-PROTO " ]" |
| 146 |
.RB "[ " spi |
| 147 |
.IR SPI " ]" |
| 148 |
|
| 149 |
.ti -8 |
| 150 |
.IR XFRM-PROTO " :=" |
| 151 |
.BR esp " | " ah " | " comp " | " route2 " | " hao |
| 152 |
|
| 153 |
.ti -8 |
| 154 |
.IR ALGO-LIST " := [ " ALGO-LIST " ] " ALGO |
| 155 |
|
| 156 |
.ti -8 |
| 157 |
.IR ALGO " :=" |
| 158 |
.RB "{ " enc " | " auth " } " |
| 159 |
.IR ALGO-NAME " " ALGO-KEYMAT " |" |
| 160 |
.br |
| 161 |
.B auth-trunc |
| 162 |
.IR ALGO-NAME " " ALGO-KEYMAT " " ALGO-TRUNC-LEN " |" |
| 163 |
.br |
| 164 |
.B aead |
| 165 |
.IR ALGO-NAME " " ALGO-KEYMAT " " ALGO-ICV-LEN " |" |
| 166 |
.br |
| 167 |
.B comp |
| 168 |
.IR ALGO-NAME |
| 169 |
|
| 170 |
.ti -8 |
| 171 |
.IR MODE " := " |
| 172 |
.BR transport " | " tunnel " | " beet " | " ro " | " in_trigger |
| 173 |
|
| 174 |
.ti -8 |
| 175 |
.IR SA-DIR " := " |
| 176 |
.BR in " | " out |
| 177 |
|
| 178 |
.ti -8 |
| 179 |
.IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG |
| 180 |
|
| 181 |
.ti -8 |
| 182 |
.IR FLAG " :=" |
| 183 |
.BR noecn " | " decap-dscp " | " nopmtudisc " | " wildrecv " | " icmp " | " |
| 184 |
.BR af-unspec " | " align4 " | " esn |
| 185 |
|
| 186 |
.ti -8 |
| 187 |
.IR SELECTOR " :=" |
| 188 |
.RB "[ " src |
| 189 |
.IR ADDR "[/" PLEN "] ]" |
| 190 |
.RB "[ " dst |
| 191 |
.IR ADDR "[/" PLEN "] ]" |
| 192 |
.RB "[ " dev |
| 193 |
.IR DEV " ]" |
| 194 |
.br |
| 195 |
.RI "[ " UPSPEC " ]" |
| 196 |
|
| 197 |
.ti -8 |
| 198 |
.IR UPSPEC " := " |
| 199 |
.BR proto " {" |
| 200 |
.IR PROTO " |" |
| 201 |
.br |
| 202 |
.RB "{ " tcp " | " udp " | " sctp " | " dccp " } [ " sport |
| 203 |
.IR PORT " ]" |
| 204 |
.RB "[ " dport |
| 205 |
.IR PORT " ] |" |
| 206 |
.br |
| 207 |
.RB "{ " icmp " | " ipv6-icmp " | " mobility-header " } [ " type |
| 208 |
.IR NUMBER " ]" |
| 209 |
.RB "[ " code |
| 210 |
.IR NUMBER " ] |" |
| 211 |
.br |
| 212 |
.BR gre " [ " key |
| 213 |
.RI "{ " DOTTED-QUAD " | " NUMBER " } ] }" |
| 214 |
|
| 215 |
.ti -8 |
| 216 |
.IR LIMIT-LIST " := [ " LIMIT-LIST " ]" |
| 217 |
.B limit |
| 218 |
.I LIMIT |
| 219 |
|
| 220 |
.ti -8 |
| 221 |
.IR LIMIT " :=" |
| 222 |
.RB "{ " time-soft " | " time-hard " | " time-use-soft " | " time-use-hard " }" |
| 223 |
.IR "SECONDS" " |" |
| 224 |
.br |
| 225 |
.RB "{ " byte-soft " | " byte-hard " }" |
| 226 |
.IR SIZE " |" |
| 227 |
.br |
| 228 |
.RB "{ " packet-soft " | " packet-hard " }" |
| 229 |
.I COUNT |
| 230 |
|
| 231 |
.ti -8 |
| 232 |
.IR ENCAP " :=" |
| 233 |
.RB "{ " espinudp " | " espinudp-nonike " | " espintcp " }" |
| 234 |
.IR SPORT " " DPORT " " OADDR |
| 235 |
|
| 236 |
.ti -8 |
| 237 |
.IR EXTRA-FLAG-LIST " := [ " EXTRA-FLAG-LIST " ] " EXTRA-FLAG |
| 238 |
|
| 239 |
.ti -8 |
| 240 |
.IR EXTRA-FLAG " := " |
| 241 |
.BR dont-encap-dscp " | " oseq-may-wrap |
| 242 |
|
| 243 |
.ti -8 |
| 244 |
.BR "ip xfrm policy" " { " add " | " update " }" |
| 245 |
.I SELECTOR |
| 246 |
.B dir |
| 247 |
.I DIR |
| 248 |
.RB "[ " ctx |
| 249 |
.IR CTX " ]" |
| 250 |
.RB "[ " mark |
| 251 |
.I MARK |
| 252 |
.RB "[ " mask |
| 253 |
.IR MASK " ] ]" |
| 254 |
.RB "[ " index |
| 255 |
.IR INDEX " ]" |
| 256 |
.RB "[ " ptype |
| 257 |
.IR PTYPE " ]" |
| 258 |
.RB "[ " action |
| 259 |
.IR ACTION " ]" |
| 260 |
.RB "[ " priority |
| 261 |
.IR PRIORITY " ]" |
| 262 |
.RB "[ " flag |
| 263 |
.IR FLAG-LIST " ]" |
| 264 |
.RB "[ " if_id |
| 265 |
.IR IF-ID " ]" |
| 266 |
.RB "[ " offload |
| 267 |
.RB packet |
| 268 |
.RB dev |
| 269 |
.IR DEV " ]" |
| 270 |
.RI "[ " LIMIT-LIST " ] [ " TMPL-LIST " ]" |
| 271 |
|
| 272 |
.ti -8 |
| 273 |
.BR "ip xfrm policy" " { " delete " | " get " }" |
| 274 |
.RI "{ " SELECTOR " | " |
| 275 |
.B index |
| 276 |
.IR INDEX " }" |
| 277 |
.B dir |
| 278 |
.I DIR |
| 279 |
.RB "[ " ctx |
| 280 |
.IR CTX " ]" |
| 281 |
.RB "[ " mark |
| 282 |
.I MARK |
| 283 |
.RB "[ " mask |
| 284 |
.IR MASK " ] ]" |
| 285 |
.RB "[ " ptype |
| 286 |
.IR PTYPE " ]" |
| 287 |
.RB "[ " if_id |
| 288 |
.IR IF-ID " ]" |
| 289 |
|
| 290 |
.ti -8 |
| 291 |
.BR ip " [ " -4 " | " -6 " ] " "xfrm policy" " { " deleteall " | " list " }" |
| 292 |
.RB "[ " nosock " ]" |
| 293 |
.RI "[ " SELECTOR " ]" |
| 294 |
.RB "[ " dir |
| 295 |
.IR DIR " ]" |
| 296 |
.RB "[ " index |
| 297 |
.IR INDEX " ]" |
| 298 |
.RB "[ " ptype |
| 299 |
.IR PTYPE " ]" |
| 300 |
.RB "[ " action |
| 301 |
.IR ACTION " ]" |
| 302 |
.RB "[ " priority |
| 303 |
.IR PRIORITY " ]" |
| 304 |
.RB "[ " flag |
| 305 |
.IR FLAG-LIST "]" |
| 306 |
|
| 307 |
.ti -8 |
| 308 |
.B "ip xfrm policy flush" |
| 309 |
.RB "[ " ptype |
| 310 |
.IR PTYPE " ]" |
| 311 |
|
| 312 |
.ti -8 |
| 313 |
.B "ip xfrm policy count" |
| 314 |
|
| 315 |
.ti -8 |
| 316 |
.B "ip xfrm policy set" |
| 317 |
.RB "[ " hthresh4 |
| 318 |
.IR LBITS " " RBITS " ]" |
| 319 |
.RB "[ " hthresh6 |
| 320 |
.IR LBITS " " RBITS " ]" |
| 321 |
|
| 322 |
.ti -8 |
| 323 |
.B "ip xfrm policy setdefault" |
| 324 |
.IR DIR |
| 325 |
.IR ACTION " [ " |
| 326 |
.IR DIR |
| 327 |
.IR ACTION " ] [ " |
| 328 |
.IR DIR |
| 329 |
.IR ACTION " ]" |
| 330 |
|
| 331 |
.ti -8 |
| 332 |
.B "ip xfrm policy getdefault" |
| 333 |
|
| 334 |
.ti -8 |
| 335 |
.IR SELECTOR " :=" |
| 336 |
.RB "[ " src |
| 337 |
.IR ADDR "[/" PLEN "] ]" |
| 338 |
.RB "[ " dst |
| 339 |
.IR ADDR "[/" PLEN "] ]" |
| 340 |
.RB "[ " dev |
| 341 |
.IR DEV " ]" |
| 342 |
.RI "[ " UPSPEC " ]" |
| 343 |
|
| 344 |
.ti -8 |
| 345 |
.IR UPSPEC " := " |
| 346 |
.BR proto " {" |
| 347 |
.IR PROTO " |" |
| 348 |
.br |
| 349 |
.RB "{ " tcp " | " udp " | " sctp " | " dccp " } [ " sport |
| 350 |
.IR PORT " ]" |
| 351 |
.RB "[ " dport |
| 352 |
.IR PORT " ] |" |
| 353 |
.br |
| 354 |
.RB "{ " icmp " | " ipv6-icmp " | " mobility-header " } [ " type |
| 355 |
.IR NUMBER " ]" |
| 356 |
.RB "[ " code |
| 357 |
.IR NUMBER " ] |" |
| 358 |
.br |
| 359 |
.BR gre " [ " key |
| 360 |
.RI "{ " DOTTED-QUAD " | " NUMBER " } ] }" |
| 361 |
|
| 362 |
.ti -8 |
| 363 |
.IR DIR " := " |
| 364 |
.BR in " | " out " | " fwd |
| 365 |
|
| 366 |
.ti -8 |
| 367 |
.IR PTYPE " := " |
| 368 |
.BR main " | " sub |
| 369 |
|
| 370 |
.ti -8 |
| 371 |
.IR ACTION " := " |
| 372 |
.BR allow " | " block |
| 373 |
|
| 374 |
.ti -8 |
| 375 |
.IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG |
| 376 |
|
| 377 |
.ti -8 |
| 378 |
.IR FLAG " :=" |
| 379 |
.BR localok " | " icmp |
| 380 |
|
| 381 |
.ti -8 |
| 382 |
.IR LIMIT-LIST " := [ " LIMIT-LIST " ]" |
| 383 |
.B limit |
| 384 |
.I LIMIT |
| 385 |
|
| 386 |
.ti -8 |
| 387 |
.IR LIMIT " :=" |
| 388 |
.RB "{ " time-soft " | " time-hard " | " time-use-soft " | " time-use-hard " }" |
| 389 |
.IR "SECONDS" " |" |
| 390 |
.br |
| 391 |
.RB "{ " byte-soft " | " byte-hard " }" |
| 392 |
.IR SIZE " |" |
| 393 |
.br |
| 394 |
.RB "{ " packet-soft " | " packet-hard " }" |
| 395 |
.I COUNT |
| 396 |
|
| 397 |
.ti -8 |
| 398 |
.IR TMPL-LIST " := [ " TMPL-LIST " ]" |
| 399 |
.B tmpl |
| 400 |
.I TMPL |
| 401 |
|
| 402 |
.ti -8 |
| 403 |
.IR TMPL " := " ID |
| 404 |
.RB "[ " mode |
| 405 |
.IR MODE " ]" |
| 406 |
.RB "[ " reqid |
| 407 |
.IR REQID " ]" |
| 408 |
.RB "[ " level |
| 409 |
.IR LEVEL " ]" |
| 410 |
|
| 411 |
.ti -8 |
| 412 |
.IR ID " :=" |
| 413 |
.RB "[ " src |
| 414 |
.IR ADDR " ]" |
| 415 |
.RB "[ " dst |
| 416 |
.IR ADDR " ]" |
| 417 |
.RB "[ " proto |
| 418 |
.IR XFRM-PROTO " ]" |
| 419 |
.RB "[ " spi |
| 420 |
.IR SPI " ]" |
| 421 |
|
| 422 |
.ti -8 |
| 423 |
.IR XFRM-PROTO " :=" |
| 424 |
.BR esp " | " ah " | " comp " | " route2 " | " hao |
| 425 |
|
| 426 |
.ti -8 |
| 427 |
.IR MODE " := " |
| 428 |
.BR transport " | " tunnel " | " beet " | " ro " | " in_trigger |
| 429 |
|
| 430 |
.ti -8 |
| 431 |
.IR LEVEL " :=" |
| 432 |
.BR required " | " use |
| 433 |
|
| 434 |
.ti -8 |
| 435 |
.BR "ip xfrm monitor" " [" |
| 436 |
.BI all-nsid |
| 437 |
] [ |
| 438 |
.BI nokeys |
| 439 |
] [ |
| 440 |
.BI all |
| 441 |
| |
| 442 |
.IR LISTofXFRM-OBJECTS " ]" |
| 443 |
|
| 444 |
.ti -8 |
| 445 |
.IR LISTofXFRM-OBJECTS " := [ " LISTofXFRM-OBJECTS " ] " XFRM-OBJECT |
| 446 |
|
| 447 |
.ti -8 |
| 448 |
.IR XFRM-OBJECT " := " |
| 449 |
.BR acquire " | " expire " | " SA " | " policy " | " aevent " | " report |
| 450 |
|
| 451 |
.in -8 |
| 452 |
.ad b |
| 453 |
|
| 454 |
.SH DESCRIPTION |
| 455 |
|
| 456 |
xfrm is an IP framework for transforming packets (such as encrypting |
| 457 |
their payloads). This framework is used to implement the IPsec protocol |
| 458 |
suite (with the |
| 459 |
.B state |
| 460 |
object operating on the Security Association Database, and the |
| 461 |
.B policy |
| 462 |
object operating on the Security Policy Database). It is also used for |
| 463 |
the IP Payload Compression Protocol and features of Mobile IPv6. |
| 464 |
|
| 465 |
.TS |
| 466 |
l l. |
| 467 |
ip xfrm state add add new state into xfrm |
| 468 |
ip xfrm state update update existing state in xfrm |
| 469 |
ip xfrm state allocspi allocate an SPI value |
| 470 |
ip xfrm state delete delete existing state in xfrm |
| 471 |
ip xfrm state get get existing state in xfrm |
| 472 |
ip xfrm state deleteall delete all existing state in xfrm |
| 473 |
ip xfrm state list print out the list of existing state in xfrm |
| 474 |
ip xfrm state flush flush all state in xfrm |
| 475 |
ip xfrm state count count all existing state in xfrm |
| 476 |
.TE |
| 477 |
|
| 478 |
.TP |
| 479 |
.IR ID |
| 480 |
is specified by a source address, destination address, |
| 481 |
.RI "transform protocol " XFRM-PROTO "," |
| 482 |
and/or Security Parameter Index |
| 483 |
.IR SPI "." |
| 484 |
(For IP Payload Compression, the Compression Parameter Index or CPI is used for |
| 485 |
.IR SPI ".)" |
| 486 |
|
| 487 |
.TP |
| 488 |
.I XFRM-PROTO |
| 489 |
specifies a transform protocol: |
| 490 |
.RB "IPsec Encapsulating Security Payload (" esp ")," |
| 491 |
.RB "IPsec Authentication Header (" ah ")," |
| 492 |
.RB "IP Payload Compression (" comp ")," |
| 493 |
.RB "Mobile IPv6 Type 2 Routing Header (" route2 "), or" |
| 494 |
.RB "Mobile IPv6 Home Address Option (" hao ")." |
| 495 |
|
| 496 |
.TP |
| 497 |
.I ALGO-LIST |
| 498 |
contains one or more algorithms to use. Each algorithm |
| 499 |
.I ALGO |
| 500 |
is specified by: |
| 501 |
.RS |
| 502 |
.IP \[bu] |
| 503 |
the algorithm type: |
| 504 |
.RB "encryption (" enc ")," |
| 505 |
.RB "authentication (" auth " or " auth-trunc ")," |
| 506 |
.RB "authenticated encryption with associated data (" aead "), or" |
| 507 |
.RB "compression (" comp ")" |
| 508 |
.IP \[bu] |
| 509 |
the algorithm name |
| 510 |
.IR ALGO-NAME |
| 511 |
(see below) |
| 512 |
.IP \[bu] |
| 513 |
.RB "(for all except " comp ")" |
| 514 |
the keying material |
| 515 |
.IR ALGO-KEYMAT "," |
| 516 |
which may include both a key and a salt or nonce value; refer to the |
| 517 |
corresponding RFC |
| 518 |
.IP \[bu] |
| 519 |
.RB "(for " auth-trunc " only)" |
| 520 |
the truncation length |
| 521 |
.I ALGO-TRUNC-LEN |
| 522 |
in bits |
| 523 |
.IP \[bu] |
| 524 |
.RB "(for " aead " only)" |
| 525 |
the Integrity Check Value length |
| 526 |
.I ALGO-ICV-LEN |
| 527 |
in bits |
| 528 |
.RE |
| 529 |
|
| 530 |
.nh |
| 531 |
.RS |
| 532 |
Encryption algorithms include |
| 533 |
.BR ecb(cipher_null) ", " cbc(des) ", " cbc(des3_ede) ", " cbc(cast5) "," |
| 534 |
.BR cbc(blowfish) ", " cbc(aes) ", " cbc(serpent) ", " cbc(camellia) "," |
| 535 |
.BR cbc(twofish) ", and " rfc3686(ctr(aes)) "." |
| 536 |
|
| 537 |
Authentication algorithms include |
| 538 |
.BR digest_null ", " hmac(md5) ", " hmac(sha1) ", " hmac(sha256) "," |
| 539 |
.BR hmac(sha384) ", " hmac(sha512) ", " hmac(rmd160) ", and " xcbc(aes) "." |
| 540 |
|
| 541 |
Authenticated encryption with associated data (AEAD) algorithms include |
| 542 |
.BR rfc4106(gcm(aes)) ", " rfc4309(ccm(aes)) ", and " rfc4543(gcm(aes)) "." |
| 543 |
|
| 544 |
Compression algorithms include |
| 545 |
.BR deflate ", " lzs ", and " lzjh "." |
| 546 |
.RE |
| 547 |
.hy |
| 548 |
|
| 549 |
.TP |
| 550 |
.I MODE |
| 551 |
specifies a mode of operation for the transform protocol. IPsec and IP Payload |
| 552 |
Compression modes are |
| 553 |
.BR transport ", " tunnel "," |
| 554 |
and (for IPsec ESP only) Bound End-to-End Tunnel |
| 555 |
.RB "(" beet ")." |
| 556 |
Mobile IPv6 modes are route optimization |
| 557 |
.RB "(" ro ")" |
| 558 |
and inbound trigger |
| 559 |
.RB "(" in_trigger ")." |
| 560 |
|
| 561 |
.TP |
| 562 |
.I FLAG-LIST |
| 563 |
contains one or more of the following optional flags: |
| 564 |
.BR noecn ", " decap-dscp ", " nopmtudisc ", " wildrecv ", " icmp ", " |
| 565 |
.BR af-unspec ", " align4 ", or " esn "." |
| 566 |
|
| 567 |
.TP |
| 568 |
.IR SELECTOR |
| 569 |
selects the traffic that will be controlled by the policy, based on the source |
| 570 |
address, the destination address, the network device, and/or |
| 571 |
.IR UPSPEC "." |
| 572 |
|
| 573 |
.TP |
| 574 |
.IR UPSPEC |
| 575 |
selects traffic by protocol. For the |
| 576 |
.BR tcp ", " udp ", " sctp ", or " dccp |
| 577 |
protocols, the source and destination port can optionally be specified. |
| 578 |
For the |
| 579 |
.BR icmp ", " ipv6-icmp ", or " mobility-header |
| 580 |
protocols, the type and code numbers can optionally be specified. |
| 581 |
For the |
| 582 |
.B gre |
| 583 |
protocol, the key can optionally be specified as a dotted-quad or number. |
| 584 |
Other protocols can be selected by name or number |
| 585 |
.IR PROTO "." |
| 586 |
|
| 587 |
.TP |
| 588 |
.I LIMIT-LIST |
| 589 |
sets limits in seconds, bytes, or numbers of packets. |
| 590 |
|
| 591 |
.TP |
| 592 |
.I ENCAP |
| 593 |
encapsulates packets with protocol |
| 594 |
.BR espinudp ", " espinudp-nonike ", or " espintcp "," |
| 595 |
.RI "using source port " SPORT ", destination port " DPORT |
| 596 |
.RI ", and original address " OADDR "." |
| 597 |
|
| 598 |
.TP |
| 599 |
.I MARK |
| 600 |
used to match xfrm policies and states |
| 601 |
|
| 602 |
.TP |
| 603 |
.I OUTPUT-MARK |
| 604 |
used to set the output mark to influence the routing |
| 605 |
of the packets emitted by the state |
| 606 |
|
| 607 |
.TP |
| 608 |
.I IF-ID |
| 609 |
xfrm interface identifier used to in both xfrm policies and states |
| 610 |
|
| 611 |
.TP |
| 612 |
.I DEV |
| 613 |
Network interface name used to offload policies and states |
| 614 |
|
| 615 |
.sp |
| 616 |
.PP |
| 617 |
.TS |
| 618 |
l l. |
| 619 |
ip xfrm policy add add a new policy |
| 620 |
ip xfrm policy update update an existing policy |
| 621 |
ip xfrm policy delete delete an existing policy |
| 622 |
ip xfrm policy get get an existing policy |
| 623 |
ip xfrm policy deleteall delete all existing xfrm policies |
| 624 |
ip xfrm policy list print out the list of xfrm policies |
| 625 |
ip xfrm policy flush flush policies |
| 626 |
.TE |
| 627 |
|
| 628 |
.TP |
| 629 |
.BR nosock |
| 630 |
filter (remove) all socket policies from the output. |
| 631 |
|
| 632 |
.TP |
| 633 |
.IR SELECTOR |
| 634 |
selects the traffic that will be controlled by the policy, based on the source |
| 635 |
address, the destination address, the network device, and/or |
| 636 |
.IR UPSPEC "." |
| 637 |
|
| 638 |
.TP |
| 639 |
.IR UPSPEC |
| 640 |
selects traffic by protocol. For the |
| 641 |
.BR tcp ", " udp ", " sctp ", or " dccp |
| 642 |
protocols, the source and destination port can optionally be specified. |
| 643 |
For the |
| 644 |
.BR icmp ", " ipv6-icmp ", or " mobility-header |
| 645 |
protocols, the type and code numbers can optionally be specified. |
| 646 |
For the |
| 647 |
.B gre |
| 648 |
protocol, the key can optionally be specified as a dotted-quad or number. |
| 649 |
Other protocols can be selected by name or number |
| 650 |
.IR PROTO "." |
| 651 |
|
| 652 |
.TP |
| 653 |
.I DIR |
| 654 |
selects the policy direction as |
| 655 |
.BR in ", " out ", or " fwd "." |
| 656 |
|
| 657 |
.TP |
| 658 |
.I CTX |
| 659 |
sets the security context. |
| 660 |
|
| 661 |
.TP |
| 662 |
.I PTYPE |
| 663 |
can be |
| 664 |
.BR main " (default) or " sub "." |
| 665 |
|
| 666 |
.TP |
| 667 |
.I ACTION |
| 668 |
can be |
| 669 |
.BR allow " (default) or " block "." |
| 670 |
|
| 671 |
.TP |
| 672 |
.I PRIORITY |
| 673 |
is a number that defaults to zero. |
| 674 |
|
| 675 |
.TP |
| 676 |
.I FLAG-LIST |
| 677 |
contains one or both of the following optional flags: |
| 678 |
.BR local " or " icmp "." |
| 679 |
|
| 680 |
.TP |
| 681 |
.I LIMIT-LIST |
| 682 |
sets limits in seconds, bytes, or numbers of packets. |
| 683 |
|
| 684 |
.TP |
| 685 |
.I TMPL-LIST |
| 686 |
is a template list specified using |
| 687 |
.IR ID ", " MODE ", " REQID ", and/or " LEVEL ". " |
| 688 |
|
| 689 |
.TP |
| 690 |
.IR ID |
| 691 |
is specified by a source address, destination address, |
| 692 |
.RI "transform protocol " XFRM-PROTO "," |
| 693 |
and/or Security Parameter Index |
| 694 |
.IR SPI "." |
| 695 |
(For IP Payload Compression, the Compression Parameter Index or CPI is used for |
| 696 |
.IR SPI ".)" |
| 697 |
|
| 698 |
.TP |
| 699 |
.I XFRM-PROTO |
| 700 |
specifies a transform protocol: |
| 701 |
.RB "IPsec Encapsulating Security Payload (" esp ")," |
| 702 |
.RB "IPsec Authentication Header (" ah ")," |
| 703 |
.RB "IP Payload Compression (" comp ")," |
| 704 |
.RB "Mobile IPv6 Type 2 Routing Header (" route2 "), or" |
| 705 |
.RB "Mobile IPv6 Home Address Option (" hao ")." |
| 706 |
|
| 707 |
.TP |
| 708 |
.I MODE |
| 709 |
specifies a mode of operation for the transform protocol. IPsec and IP Payload |
| 710 |
Compression modes are |
| 711 |
.BR transport ", " tunnel "," |
| 712 |
and (for IPsec ESP only) Bound End-to-End Tunnel |
| 713 |
.RB "(" beet ")." |
| 714 |
Mobile IPv6 modes are route optimization |
| 715 |
.RB "(" ro ")" |
| 716 |
and inbound trigger |
| 717 |
.RB "(" in_trigger ")." |
| 718 |
|
| 719 |
.TP |
| 720 |
.I LEVEL |
| 721 |
can be |
| 722 |
.BR required " (default) or " use "." |
| 723 |
|
| 724 |
.sp |
| 725 |
.PP |
| 726 |
.TS |
| 727 |
l l. |
| 728 |
ip xfrm policy count count existing policies |
| 729 |
.TE |
| 730 |
|
| 731 |
.PP |
| 732 |
Use one or more -s options to display more details, including policy hash table |
| 733 |
information. |
| 734 |
|
| 735 |
.sp |
| 736 |
.PP |
| 737 |
.TS |
| 738 |
l l. |
| 739 |
ip xfrm policy set configure the policy hash table |
| 740 |
.TE |
| 741 |
|
| 742 |
.PP |
| 743 |
Security policies whose address prefix lengths are greater than or equal |
| 744 |
policy hash table thresholds are hashed. Others are stored in the |
| 745 |
policy_inexact chained list. |
| 746 |
|
| 747 |
.TP |
| 748 |
.I LBITS |
| 749 |
specifies the minimum local address prefix length of policies that are |
| 750 |
stored in the Security Policy Database hash table. |
| 751 |
|
| 752 |
.TP |
| 753 |
.I RBITS |
| 754 |
specifies the minimum remote address prefix length of policies that are |
| 755 |
stored in the Security Policy Database hash table. |
| 756 |
|
| 757 |
.sp |
| 758 |
.PP |
| 759 |
.TS |
| 760 |
l l. |
| 761 |
ip xfrm monitor state monitoring for xfrm objects |
| 762 |
.TE |
| 763 |
|
| 764 |
.PP |
| 765 |
The xfrm objects to monitor can be optionally specified. |
| 766 |
|
| 767 |
.P |
| 768 |
If the |
| 769 |
.BI all-nsid |
| 770 |
option is set, the program listens to all network namespaces that have a |
| 771 |
nsid assigned into the network namespace were the program is running. |
| 772 |
A prefix is displayed to show the network namespace where the message |
| 773 |
originates. Example: |
| 774 |
.sp |
| 775 |
.in +2 |
| 776 |
[nsid 1]Flushed state proto 0 |
| 777 |
.in -2 |
| 778 |
.sp |
| 779 |
|
| 780 |
.SH AUTHOR |
| 781 |
Manpage revised by David Ward <[email protected]> |
| 782 |
.br |
| 783 |
Manpage revised by Christophe Gouault <[email protected]> |
| 784 |
.br |
| 785 |
Manpage revised by Nicolas Dichtel <[email protected]> |