This YANG module provides a Netgate-defined data-model for Netbsd Packet Filters.
Copyright 2024 Rubicon Communications, LLC.
Netbsd Packet Filter (NPF) data needed to support VPP. It consists of a set of named tables containing IP prefixes, a set of named filtering rules, and a set of named NAT rules.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:npf-config": {
- "netgate-npf:options": {
- "netgate-npf:interfaces": {
- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
}, - "netgate-npf:nat-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": null,
- "netgate-npf:if-name": null,
- "netgate-npf:table-name": null,
- "netgate-npf:inverted": null,
- "netgate-npf:port-min": null,
- "netgate-npf:prefix": null
}, - "netgate-npf:to": {
- "netgate-npf:port-max": null,
- "netgate-npf:if-name": null,
- "netgate-npf:table-name": null,
- "netgate-npf:inverted": null,
- "netgate-npf:port-min": null,
- "netgate-npf:prefix": null
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
]
}, - "netgate-npf:prefix-tables": {
- "netgate-npf:table": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
]
}, - "netgate-npf:filter-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": null,
- "netgate-npf:if-name": null,
- "netgate-npf:table-name": null,
- "netgate-npf:inverted": null,
- "netgate-npf:port-min": null,
- "netgate-npf:prefix": null
}, - "netgate-npf:to": {
- "netgate-npf:port-max": null,
- "netgate-npf:if-name": null,
- "netgate-npf:table-name": null,
- "netgate-npf:inverted": null,
- "netgate-npf:port-min": null,
- "netgate-npf:prefix": null
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
]
}
}
}
Netbsd Packet Filter (NPF) data needed to support VPP. It consists of a set of named tables containing IP prefixes, a set of named filtering rules, and a set of named NAT rules.
netgate.npf.NpfConfig to be added to list
object (netgate.npf.npfconfig.Options) NPF interface configuration and enablement options. | |
object (netgate.npf.npfconfig.NatRulesets) A list of NPF NAT rulesets. | |
object (netgate.npf.npfconfig.PrefixTables) Tables of named IP prefix lists. | |
object (netgate.npf.npfconfig.FilterRulesets) A list of named NPF filter rulesets. |
{- "netgate-npf:options": {
- "netgate-npf:interfaces": {
- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
}, - "netgate-npf:nat-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
]
}, - "netgate-npf:prefix-tables": {
- "netgate-npf:table": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
]
}, - "netgate-npf:filter-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
]
}
}
Netbsd Packet Filter (NPF) data needed to support VPP. It consists of a set of named tables containing IP prefixes, a set of named filtering rules, and a set of named NAT rules.
netgate.npf.NpfConfig to be added or updated
object (netgate.npf.NpfConfig) Netbsd Packet Filter (NPF) data needed to support VPP. It consists of a set of named tables containing IP prefixes, a set of named filtering rules, and a set of named NAT rules. |
{- "netgate-npf:npf-config": {
- "netgate-npf:options": {
- "netgate-npf:interfaces": {
- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
}, - "netgate-npf:nat-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": null,
- "netgate-npf:if-name": null,
- "netgate-npf:table-name": null,
- "netgate-npf:inverted": null,
- "netgate-npf:port-min": null,
- "netgate-npf:prefix": null
}, - "netgate-npf:to": {
- "netgate-npf:port-max": null,
- "netgate-npf:if-name": null,
- "netgate-npf:table-name": null,
- "netgate-npf:inverted": null,
- "netgate-npf:port-min": null,
- "netgate-npf:prefix": null
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
]
}, - "netgate-npf:prefix-tables": {
- "netgate-npf:table": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
]
}, - "netgate-npf:filter-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": null,
- "netgate-npf:if-name": null,
- "netgate-npf:table-name": null,
- "netgate-npf:inverted": null,
- "netgate-npf:port-min": null,
- "netgate-npf:prefix": null
}, - "netgate-npf:to": {
- "netgate-npf:port-max": null,
- "netgate-npf:if-name": null,
- "netgate-npf:table-name": null,
- "netgate-npf:inverted": null,
- "netgate-npf:port-min": null,
- "netgate-npf:prefix": null
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
]
}
}
}
Netbsd Packet Filter (NPF) data needed to support VPP. It consists of a set of named tables containing IP prefixes, a set of named filtering rules, and a set of named NAT rules.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:filter-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
]
}
}
A list of named NPF filter rulesets.
netgate.npf.npfconfig.FilterRulesets to be added to list
Array of objects (netgate.npf.npfconfig.filterrulesets.Ruleset) |
{- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
]
}
A list of named NPF filter rulesets.
netgate.npf.npfconfig.FilterRulesets to be added or updated
object (netgate.npf.npfconfig.FilterRulesets) A list of named NPF filter rulesets. |
{- "netgate-npf:filter-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
]
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
creates netgate.npf.npfconfig.filterrulesets.Ruleset
netgate.npf.npfconfig.filterrulesets.Ruleset to be added to list
netgate-npf:name | string The name of the filter ruleset. |
netgate-npf:description | string A user description of the NPF filter ruleset. |
object (netgate.npf.npfconfig.filterrulesets.ruleset.Rules) A list of filter rules within a ruleset ordered by sequence number. |
{- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
returns netgate.npf.npfconfig.filterrulesets.Ruleset
name required | string Id of ruleset |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:ruleset": {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
}
creates or updates netgate.npf.npfconfig.filterrulesets.Ruleset
name required | string Id of ruleset |
netgate.npf.npfconfig.filterrulesets.Ruleset to be added or updated
object (netgate.npf.npfconfig.filterrulesets.Ruleset) |
{- "netgate-npf:ruleset": {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
}
removes netgate.npf.npfconfig.filterrulesets.Ruleset
name required | string Id of ruleset |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
A list of filter rules within a ruleset ordered by sequence number.
name required | string Id of ruleset |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
A list of filter rules within a ruleset ordered by sequence number.
name required | string Id of ruleset |
netgate.npf.npfconfig.filterrulesets.ruleset.Rules to be added to list
Array of objects (netgate.npf.npfconfig.filterrulesets.ruleset.rules.Rule) |
{- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
A list of filter rules within a ruleset ordered by sequence number.
name required | string Id of ruleset |
netgate.npf.npfconfig.filterrulesets.ruleset.Rules to be added or updated
object (netgate.npf.npfconfig.filterrulesets.ruleset.Rules) A list of filter rules within a ruleset ordered by sequence number. |
{- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
]
}
}
A list of filter rules within a ruleset ordered by sequence number.
name required | string Id of ruleset |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
creates netgate.npf.npfconfig.filterrulesets.ruleset.rules.Rule
name required | string Id of ruleset |
netgate.npf.npfconfig.filterrulesets.ruleset.rules.Rule to be added to list
object (netgate.npf.NpfMatch) The packet attributes to match in an NPF rule. | |
netgate-npf:sequence | integer <int64> The NPF filter rule sequence number. |
netgate-npf:return-rst | boolean Return a TCP reset on match. |
netgate-npf:in | boolean Apply rule on 'in' code paths. |
netgate-npf:pass | boolean If true, the packet is passed, else blocked. |
netgate-npf:return-icmp | boolean Return an ICMP error on match (Destination Unreachable/Administratively Prohibited). |
netgate-npf:description | string A user description of the NPF filter rule. |
netgate-npf:tentative | boolean If this rule is matched, ruleset examination continues and this rule is applied only if there is no other rule to apply. If there is one, then this rule’s match is ignored and the other rule takes preference. |
netgate-npf:ip-version | string (netgate.common.IpAddressFamily) Enum: "ipv4" "ipv6" |
netgate-npf:stateful | boolean Create a stateful connection entry upon match. |
netgate-npf:out | boolean Apply rule on 'out' code paths. |
{- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
returns netgate.npf.npfconfig.filterrulesets.ruleset.rules.Rule
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:rule": {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
}
creates or updates netgate.npf.npfconfig.filterrulesets.ruleset.rules.Rule
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.npfconfig.filterrulesets.ruleset.rules.Rule to be added or updated
object (netgate.npf.npfconfig.filterrulesets.ruleset.rules.Rule) |
{- "netgate-npf:rule": {
- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:sequence": 0,
- "netgate-npf:return-rst": true,
- "netgate-npf:in": true,
- "netgate-npf:pass": true,
- "netgate-npf:return-icmp": true,
- "netgate-npf:description": "string",
- "netgate-npf:tentative": true,
- "netgate-npf:ip-version": "ipv4",
- "netgate-npf:stateful": true,
- "netgate-npf:out": true
}
}
removes netgate.npf.npfconfig.filterrulesets.ruleset.rules.Rule
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
returns netgate.npf.NpfMatch
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/filter" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}
}
creates netgate.npf.NpfMatch
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfMatch to be added to list
object (netgate.npf.NpfMatch) The packet attributes to match in an NPF rule. |
{- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}
}
creates or updates netgate.npf.NpfMatch
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfMatch to be added or updated
object (netgate.npf.NpfMatch) The packet attributes to match in an NPF rule. |
{- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}
}
removes netgate.npf.NpfMatch
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/filter" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
The source pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/filter/from" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The source pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfEndpoint to be added to list
object (netgate.npf.NpfEndpoint) NPF source or destination endpoint |
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The source pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfEndpoint to be added or updated
object (netgate.npf.NpfEndpoint) NPF source or destination endpoint |
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The source pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/filter/from" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
The destination pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/filter/to" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The destination pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfEndpoint to be added to list
object (netgate.npf.NpfEndpoint) NPF source or destination endpoint |
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The destination pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfEndpoint to be added or updated
object (netgate.npf.NpfEndpoint) NPF source or destination endpoint |
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The destination pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/filter-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/filter/to" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:nat-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
]
}
}
A list of NPF NAT rulesets.
netgate.npf.npfconfig.NatRulesets to be added to list
Array of objects (netgate.npf.npfconfig.natrulesets.Ruleset) |
{- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
]
}
A list of NPF NAT rulesets.
netgate.npf.npfconfig.NatRulesets to be added or updated
object (netgate.npf.npfconfig.NatRulesets) A list of NPF NAT rulesets. |
{- "netgate-npf:nat-rulesets": {
- "netgate-npf:ruleset": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
]
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
creates netgate.npf.npfconfig.natrulesets.Ruleset
netgate.npf.npfconfig.natrulesets.Ruleset to be added to list
netgate-npf:name | string The name of the NAT ruleset. |
netgate-npf:description | string A user description of the NPF NAT ruleset. |
object (netgate.npf.npfconfig.natrulesets.ruleset.Rules) A list of NAT rules within a ruleset ordered by sequence number. |
{- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
returns netgate.npf.npfconfig.natrulesets.Ruleset
name required | string Id of ruleset |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:ruleset": {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
}
creates or updates netgate.npf.npfconfig.natrulesets.Ruleset
name required | string Id of ruleset |
netgate.npf.npfconfig.natrulesets.Ruleset to be added or updated
object (netgate.npf.npfconfig.natrulesets.Ruleset) |
{- "netgate-npf:ruleset": {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
}
removes netgate.npf.npfconfig.natrulesets.Ruleset
name required | string Id of ruleset |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
A list of NAT rules within a ruleset ordered by sequence number.
name required | string Id of ruleset |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
A list of NAT rules within a ruleset ordered by sequence number.
name required | string Id of ruleset |
netgate.npf.npfconfig.natrulesets.ruleset.Rules to be added to list
Array of objects (netgate.npf.npfconfig.natrulesets.ruleset.rules.Rule) |
{- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
A list of NAT rules within a ruleset ordered by sequence number.
name required | string Id of ruleset |
netgate.npf.npfconfig.natrulesets.ruleset.Rules to be added or updated
object (netgate.npf.npfconfig.natrulesets.ruleset.Rules) A list of NAT rules within a ruleset ordered by sequence number. |
{- "netgate-npf:rules": {
- "netgate-npf:rule": [
- {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
]
}
}
A list of NAT rules within a ruleset ordered by sequence number.
name required | string Id of ruleset |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
creates netgate.npf.npfconfig.natrulesets.ruleset.rules.Rule
name required | string Id of ruleset |
netgate.npf.npfconfig.natrulesets.ruleset.rules.Rule to be added to list
netgate-npf:sequence | integer <int64> The NPF NAT rule sequence number. |
object (netgate.npf.npfconfig.natrulesets.ruleset.rules.rule.Translation) NAT translation information. | |
object (netgate.npf.NpfMatch) The packet attributes to match in an NPF rule. | |
netgate-npf:description | string A user description of the NPF NAT rule. |
netgate-npf:dynamic | boolean true/false flag |
netgate-npf:no-ports | boolean true/false flag |
netgate-npf:direction | string (netgate.npf.NpfNatDirection) Enum: "in" "out" |
netgate-npf:algorithm | string (netgate.npf.NpfNatAlgorithm) Enum: "one-to-one" "netmap" "ip-hash" "round-robin" "npt66" |
{- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
returns netgate.npf.npfconfig.natrulesets.ruleset.rules.Rule
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:rule": {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
}
creates or updates netgate.npf.npfconfig.natrulesets.ruleset.rules.Rule
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.npfconfig.natrulesets.ruleset.rules.Rule to be added or updated
object (netgate.npf.npfconfig.natrulesets.ruleset.rules.Rule) |
{- "netgate-npf:rule": {
- "netgate-npf:sequence": 0,
- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}, - "netgate-npf:match": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}, - "netgate-npf:description": "string",
- "netgate-npf:dynamic": true,
- "netgate-npf:no-ports": true,
- "netgate-npf:direction": "in",
- "netgate-npf:algorithm": "one-to-one"
}
}
removes netgate.npf.npfconfig.natrulesets.ruleset.rules.Rule
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
returns netgate.npf.NpfMatch
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/match" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}
}
creates netgate.npf.NpfMatch
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfMatch to be added to list
object (netgate.npf.NpfMatch) The packet attributes to match in an NPF rule. |
{- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}
}
creates or updates netgate.npf.NpfMatch
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfMatch to be added or updated
object (netgate.npf.NpfMatch) The packet attributes to match in an NPF rule. |
{- "netgate-npf:filter": {
- "netgate-npf:icmp-type": 0,
- "netgate-npf:tcp-flags-mask": "string",
- "netgate-npf:icmp-code": 0,
- "netgate-npf:protocol-set": "string",
- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:to": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}, - "netgate-npf:tcp-flags-value": "string"
}
}
removes netgate.npf.NpfMatch
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/match" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
The source pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/match/from" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The source pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfEndpoint to be added to list
object (netgate.npf.NpfEndpoint) NPF source or destination endpoint |
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The source pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfEndpoint to be added or updated
object (netgate.npf.NpfEndpoint) NPF source or destination endpoint |
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The source pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/match/from" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
The destination pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/match/to" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The destination pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfEndpoint to be added to list
object (netgate.npf.NpfEndpoint) NPF source or destination endpoint |
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The destination pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.NpfEndpoint to be added or updated
object (netgate.npf.NpfEndpoint) NPF source or destination endpoint |
{- "netgate-npf:from": {
- "netgate-npf:port-max": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:table-name": "string",
- "netgate-npf:inverted": true,
- "netgate-npf:port-min": 0,
- "netgate-npf:prefix": "string"
}
}
The destination pattern to match in an NPF rule.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/match/to" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
NAT translation information.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/translation" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}
}
NAT translation information.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.npfconfig.natrulesets.ruleset.rules.rule.Translation to be added to list
netgate-npf:port | integer <int32> Port to use for translation. 0 means no port. |
netgate-npf:if-name | string Use IF addresses for translation. |
netgate-npf:prefix | string Translation prefix. |
{- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}
NAT translation information.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
netgate.npf.npfconfig.natrulesets.ruleset.rules.rule.Translation to be added or updated
object (netgate.npf.npfconfig.natrulesets.ruleset.rules.rule.Translation) NAT translation information. |
{- "netgate-npf:translation": {
- "netgate-npf:port": 0,
- "netgate-npf:if-name": "string",
- "netgate-npf:prefix": "string"
}
}
NAT translation information.
name required | string Id of ruleset |
sequence required | integer <int64> Id of rule |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/nat-rulesets/ruleset=%7Bname%7D/rules/rule=%7Bsequence%7D/translation" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/options" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:options": {
- "netgate-npf:interfaces": {
- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
}
}
NPF interface configuration and enablement options.
netgate.npf.npfconfig.Options to be added to list
object (netgate.npf.npfconfig.options.Interfaces) The names of filtering and NAT rulesets applied to interfaces. |
{- "netgate-npf:interfaces": {
- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
}
NPF interface configuration and enablement options.
netgate.npf.npfconfig.Options to be added or updated
object (netgate.npf.npfconfig.Options) NPF interface configuration and enablement options. |
{- "netgate-npf:options": {
- "netgate-npf:interfaces": {
- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/options" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
The names of filtering and NAT rulesets applied to interfaces.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/options/interfaces" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:interfaces": {
- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
}
The names of filtering and NAT rulesets applied to interfaces.
netgate.npf.npfconfig.options.Interfaces to be added to list
Array of objects (netgate.npf.npfconfig.options.interfaces.Interface) |
{- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
The names of filtering and NAT rulesets applied to interfaces.
netgate.npf.npfconfig.options.Interfaces to be added or updated
object (netgate.npf.npfconfig.options.Interfaces) The names of filtering and NAT rulesets applied to interfaces. |
{- "netgate-npf:interfaces": {
- "netgate-npf:interface": [
- {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
]
}
}
The names of filtering and NAT rulesets applied to interfaces.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/options/interfaces" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
creates netgate.npf.npfconfig.options.interfaces.Interface
netgate.npf.npfconfig.options.interfaces.Interface to be added to list
netgate-npf:nat-ruleset | string The name of the NAT ruleset on this interface. |
netgate-npf:filter-ruleset | string The name of the filter ruleset on this interface. |
netgate-npf:if-name | string The name of an interface. |
{- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
returns netgate.npf.npfconfig.options.interfaces.Interface
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/options/interfaces/interface=%7Bif-name%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:interface": {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
}
creates or updates netgate.npf.npfconfig.options.interfaces.Interface
if-name required | string Id of interface |
netgate.npf.npfconfig.options.interfaces.Interface to be added or updated
object (netgate.npf.npfconfig.options.interfaces.Interface) |
{- "netgate-npf:interface": {
- "netgate-npf:nat-ruleset": "string",
- "netgate-npf:filter-ruleset": "string",
- "netgate-npf:if-name": "string"
}
}
removes netgate.npf.npfconfig.options.interfaces.Interface
if-name required | string Id of interface |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/options/interfaces/interface=%7Bif-name%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/prefix-tables" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:prefix-tables": {
- "netgate-npf:table": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
]
}
}
Tables of named IP prefix lists.
netgate.npf.npfconfig.PrefixTables to be added to list
Array of objects (netgate.npf.npfconfig.prefixtables.Table) |
{- "netgate-npf:table": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
]
}
Tables of named IP prefix lists.
netgate.npf.npfconfig.PrefixTables to be added or updated
object (netgate.npf.npfconfig.PrefixTables) Tables of named IP prefix lists. |
{- "netgate-npf:prefix-tables": {
- "netgate-npf:table": [
- {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
]
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/prefix-tables" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
creates netgate.npf.npfconfig.prefixtables.Table
netgate.npf.npfconfig.prefixtables.Table to be added to list
netgate-npf:name | string The name of an IP prefix table. |
netgate-npf:description | string A text description of the NPF prefix table. |
object (netgate.npf.npfconfig.prefixtables.table.Prefixes) Each table is a named set of IP prefixes. |
{- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
returns netgate.npf.npfconfig.prefixtables.Table
name required | string Id of table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/prefix-tables/table=%7Bname%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:table": {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
}
creates or updates netgate.npf.npfconfig.prefixtables.Table
name required | string Id of table |
netgate.npf.npfconfig.prefixtables.Table to be added or updated
object (netgate.npf.npfconfig.prefixtables.Table) |
{- "netgate-npf:table": {
- "netgate-npf:name": "string",
- "netgate-npf:description": "string",
- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
}
removes netgate.npf.npfconfig.prefixtables.Table
name required | string Id of table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/prefix-tables/table=%7Bname%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Each table is a named set of IP prefixes.
name required | string Id of table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/prefix-tables/table=%7Bname%7D/prefixes" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
Each table is a named set of IP prefixes.
name required | string Id of table |
netgate.npf.npfconfig.prefixtables.table.Prefixes to be added to list
netgate-npf:prefix | Array of strings Either an IPv4 or IPv6 prefix. |
{- "netgate-npf:prefix": [
- "string"
]
}
Each table is a named set of IP prefixes.
name required | string Id of table |
netgate.npf.npfconfig.prefixtables.table.Prefixes to be added or updated
object (netgate.npf.npfconfig.prefixtables.table.Prefixes) Each table is a named set of IP prefixes. |
{- "netgate-npf:prefixes": {
- "netgate-npf:prefix": [
- "string"
]
}
}
Each table is a named set of IP prefixes.
name required | string Id of table |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-npf:npf-config/prefix-tables/table=%7Bname%7D/prefixes" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }