[d24f17c] | 1 | /*
|
---|
| 2 | Language: Packet Filter config
|
---|
| 3 | Description: pf.conf — packet filter configuration file (OpenBSD)
|
---|
| 4 | Author: Peter Piwowarski <oldlaptop654@aol.com>
|
---|
| 5 | Website: http://man.openbsd.org/pf.conf
|
---|
| 6 | Category: config
|
---|
| 7 | */
|
---|
| 8 |
|
---|
| 9 | function pf(hljs) {
|
---|
| 10 | const MACRO = {
|
---|
| 11 | className: 'variable',
|
---|
| 12 | begin: /\$[\w\d#@][\w\d_]*/
|
---|
| 13 | };
|
---|
| 14 | const TABLE = {
|
---|
| 15 | className: 'variable',
|
---|
| 16 | begin: /<(?!\/)/,
|
---|
| 17 | end: />/
|
---|
| 18 | };
|
---|
| 19 |
|
---|
| 20 | return {
|
---|
| 21 | name: 'Packet Filter config',
|
---|
| 22 | aliases: [ 'pf.conf' ],
|
---|
| 23 | keywords: {
|
---|
| 24 | $pattern: /[a-z0-9_<>-]+/,
|
---|
| 25 | built_in: /* block match pass are "actions" in pf.conf(5), the rest are
|
---|
| 26 | * lexically similar top-level commands.
|
---|
| 27 | */
|
---|
| 28 | 'block match pass load anchor|5 antispoof|10 set table',
|
---|
| 29 | keyword:
|
---|
| 30 | 'in out log quick on rdomain inet inet6 proto from port os to route ' +
|
---|
| 31 | 'allow-opts divert-packet divert-reply divert-to flags group icmp-type ' +
|
---|
| 32 | 'icmp6-type label once probability recieved-on rtable prio queue ' +
|
---|
| 33 | 'tos tag tagged user keep fragment for os drop ' +
|
---|
| 34 | 'af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin ' +
|
---|
| 35 | 'source-hash static-port ' +
|
---|
| 36 | 'dup-to reply-to route-to ' +
|
---|
| 37 | 'parent bandwidth default min max qlimit ' +
|
---|
| 38 | 'block-policy debug fingerprints hostid limit loginterface optimization ' +
|
---|
| 39 | 'reassemble ruleset-optimization basic none profile skip state-defaults ' +
|
---|
| 40 | 'state-policy timeout ' +
|
---|
| 41 | 'const counters persist ' +
|
---|
| 42 | 'no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy ' +
|
---|
| 43 | 'source-track global rule max-src-nodes max-src-states max-src-conn ' +
|
---|
| 44 | 'max-src-conn-rate overload flush ' +
|
---|
| 45 | 'scrub|5 max-mss min-ttl no-df|10 random-id',
|
---|
| 46 | literal:
|
---|
| 47 | 'all any no-route self urpf-failed egress|5 unknown'
|
---|
| 48 | },
|
---|
| 49 | contains: [
|
---|
| 50 | hljs.HASH_COMMENT_MODE,
|
---|
| 51 | hljs.NUMBER_MODE,
|
---|
| 52 | hljs.QUOTE_STRING_MODE,
|
---|
| 53 | MACRO,
|
---|
| 54 | TABLE
|
---|
| 55 | ]
|
---|
| 56 | };
|
---|
| 57 | }
|
---|
| 58 |
|
---|
| 59 | module.exports = pf;
|
---|