{ "nftables": [ { "metainfo": { "version": "VERSION", "release_name": "RELEASE_NAME", "json_schema_version": 1 } }, { "table": { "family": "ip", "name": "test", "handle": 0 } }, { "chain": { "family": "ip", "table": "test", "name": "test", "handle": 0 } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "payload": { "protocol": "ip", "field": "saddr" } }, "right": "127.0.0.1" } }, { "accept": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "meta": { "key": "iif" } }, "right": "lo" } }, { "accept": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "!=", "left": { "payload": { "protocol": "tcp", "field": "dport" } }, "right": 22 } }, { "drop": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "payload": { "protocol": "ip", "field": "saddr" } }, "right": { "prefix": { "addr": "127.0.0.0", "len": 8 } } } }, { "accept": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "payload": { "protocol": "ip", "field": "saddr" } }, "right": { "range": [ "127.0.0.1", "192.168.7.3" ] } } }, { "accept": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "payload": { "protocol": "tcp", "field": "sport" } }, "right": { "range": [ 1, 1023 ] } } }, { "drop": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "payload": { "protocol": "ip", "field": "daddr" } }, "right": { "set": [ "192.168.7.1", "192.168.7.5" ] } } }, { "accept": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "payload": { "protocol": "tcp", "field": "dport" } }, "right": { "set": [ 80, 443 ] } } }, { "accept": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "concat": [ { "payload": { "protocol": "ip", "field": "daddr" } }, { "payload": { "protocol": "tcp", "field": "dport" } } ] }, "right": { "set": [ { "concat": [ "192.168.0.1", 22 ] } ] } } }, { "accept": null } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "mangle": { "key": { "meta": { "key": "mark" } }, "value": { "map": { "key": { "payload": { "protocol": "ip", "field": "daddr" } }, "data": { "set": [ [ "192.168.0.1", 1 ] ] } } } } } ] } }, { "rule": { "family": "ip", "table": "test", "chain": "test", "handle": 0, "expr": [ { "match": { "op": "==", "left": { "ct": { "key": "state" } }, "right": { "set": [ "established", "related" ] } } }, { "accept": null } ] } } ] }