1ipmap :: = mapblock | redir | map . 2 3map ::= mapit ifname ipmask "->" ipmask [ mapport | mapicmpid ] . 4map ::= mapit ifname fromto "->" ipmask [ mapport | mapicmpid ] . 5mapblock ::= "map-block" ifname ipmask "->" ipmask [ ports ] . 6redir ::= "rdr" ifname ipmask dport "->" ip [ "," ip ] [ ports ] options . 7 8dport ::= "port" portnum [ "-" portnum ] . 9ports ::= "ports" numports | "auto" . 10mapit ::= "map" | "bimap" . 11fromto ::= "from" object "to" object . 12ipmask ::= ip "/" bits | ip "/" mask | ip "netmask" mask . 13mapport ::= "portmap" tcpudp portnumber ":" portnumber . 14mapicmpid ::= "icmpidmap" icmp idnumber ":" idnumber . 15options ::= [ tcpudp ] [ rr ] . 16 17object = addr [ port-comp | port-range ] . 18addr = "any" | nummask | host-name [ "mask" ipaddr | "mask" hexnumber ] . 19port-comp = "port" compare port-num . 20port-range = "port" port-num range port-num . 21 22rr ::= "round-robin" . 23tcpudp ::= "tcp" | "udp" | "tcp/udp" . 24portnumber ::= number { numbers } | "auto" . 25idnumber ::= number { numbers } . 26ifname ::= 'A' - 'Z' { 'A' - 'Z' } numbers . 27 28numbers ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' . 29