netgate-nat API (24.10)

This YANG module provides a Netgate-defined data-model for Network Address Translation data.

Copyright 2017-2020 Rubicon Communications, LLC.

nat-config

returns netgate.nat.NatConfig

Network Address Translation (NAT) data needed to support VPP.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:nat-config": {
    }
}

creates netgate.nat.NatConfig

Network Address Translation (NAT) data needed to support VPP.

Request Body schema: application/yang-data+json

netgate.nat.NatConfig to be added to list

object (netgate.nat.natconfig.GlobalOptions)

NAT global options

object (netgate.nat.natconfig.Ipfix)

IPFIX information.

object (netgate.nat.natconfig.Dynamic)

Dynamic mapping information.

object (netgate.nat.natconfig.Static)

Static mapping information.

object (netgate.nat.natconfig.Nat64)

NAT for IPv6/IPv4.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:global-options": {
    },
  • "netgate-nat:ipfix": {
    },
  • "netgate-nat:dynamic": {
    },
  • "netgate-nat:static": {
    },
  • "netgate-nat:nat64": {
    }
}

creates or updates netgate.nat.NatConfig

Network Address Translation (NAT) data needed to support VPP.

Request Body schema: application/yang-data+json

netgate.nat.NatConfig to be added or updated

object (netgate.nat.NatConfig)

Network Address Translation (NAT) data needed to support VPP.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:nat-config": {
    }
}

removes netgate.nat.NatConfig

Network Address Translation (NAT) data needed to support VPP.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-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))

}

returns netgate.nat.natconfig.Dynamic

Dynamic mapping information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:dynamic": {
    }
}

creates netgate.nat.natconfig.Dynamic

Dynamic mapping information.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.Dynamic to be added to list

object (netgate.nat.natconfig.dynamic.PoolIfTable)

NAT interface pool table.

object (netgate.nat.natconfig.dynamic.PoolTable)

NAT address pool table.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-if-table": {
    },
  • "netgate-nat:pool-table": {
    }
}

creates or updates netgate.nat.natconfig.Dynamic

Dynamic mapping information.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.Dynamic to be added or updated

object (netgate.nat.natconfig.Dynamic)

Dynamic mapping information.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:dynamic": {
    }
}

removes netgate.nat.natconfig.Dynamic

Dynamic mapping information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic"

	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.nat.natconfig.dynamic.PoolIfTable

NAT interface pool table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic/pool-if-table"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-if-table": {
    }
}

creates netgate.nat.natconfig.dynamic.PoolIfTable

NAT interface pool table.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.dynamic.PoolIfTable to be added to list

Array of objects (netgate.nat.natconfig.dynamic.pooliftable.IfEntry)

Dynamic pool interface entries.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:if-entry": [
    ]
}

creates or updates netgate.nat.natconfig.dynamic.PoolIfTable

NAT interface pool table.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.dynamic.PoolIfTable to be added or updated

object (netgate.nat.natconfig.dynamic.PoolIfTable)

NAT interface pool table.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-if-table": {
    }
}

removes netgate.nat.natconfig.dynamic.PoolIfTable

NAT interface pool table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic/pool-if-table"

	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.nat.natconfig.dynamic.pooliftable.IfEntry

Dynamic pool interface entries.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.dynamic.pooliftable.IfEntry to be added to list

netgate-nat:if-name
string

The name of an interface whose IPv4 addresses are added to the pool of addresses used in NAT mappings.

netgate-nat:twice-nat
boolean

Twice-nat address range for external hosts.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:if-name": "string",
  • "netgate-nat:twice-nat": true
}

returns netgate.nat.natconfig.dynamic.pooliftable.IfEntry

Dynamic pool interface entries.

path Parameters
if-name
required
string

Id of if-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic/pool-if-table/if-entry=%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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:if-entry": {
    }
}

creates or updates netgate.nat.natconfig.dynamic.pooliftable.IfEntry

Dynamic pool interface entries.

path Parameters
if-name
required
string

Id of if-entry

Request Body schema: application/yang-data+json

netgate.nat.natconfig.dynamic.pooliftable.IfEntry to be added or updated

object (netgate.nat.natconfig.dynamic.pooliftable.IfEntry)

Dynamic pool interface entries.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:if-entry": {
    }
}

removes netgate.nat.natconfig.dynamic.pooliftable.IfEntry

Dynamic pool interface entries.

path Parameters
if-name
required
string

Id of if-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic/pool-if-table/if-entry=%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))

}

returns netgate.nat.natconfig.dynamic.PoolTable

NAT address pool table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic/pool-table"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-table": {
    }
}

creates netgate.nat.natconfig.dynamic.PoolTable

NAT address pool table.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.dynamic.PoolTable to be added to list

Array of objects (netgate.nat.natconfig.dynamic.pooltable.PoolEntry)

NAT address range entry.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-entry": [
    ]
}

creates or updates netgate.nat.natconfig.dynamic.PoolTable

NAT address pool table.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.dynamic.PoolTable to be added or updated

object (netgate.nat.natconfig.dynamic.PoolTable)

NAT address pool table.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-table": {
    }
}

removes netgate.nat.natconfig.dynamic.PoolTable

NAT address pool table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic/pool-table"

	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.nat.natconfig.dynamic.pooltable.PoolEntry

NAT address range entry.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.dynamic.pooltable.PoolEntry to be added to list

netgate-nat:route-table-name
string

The route table name.

netgate-nat:first-address
string

The first IPv4 address in the range.

netgate-nat:last-address
string

The last IPv4 address in the range.

netgate-nat:twice-nat
boolean

Twice-nat address range for external hosts.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:route-table-name": "string",
  • "netgate-nat:first-address": "string",
  • "netgate-nat:last-address": "string",
  • "netgate-nat:twice-nat": true
}

returns netgate.nat.natconfig.dynamic.pooltable.PoolEntry

NAT address range entry.

path Parameters
first-address
required
string

Id of pool-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic/pool-table/pool-entry=%7Bfirst-address%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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-entry": {
    }
}

creates or updates netgate.nat.natconfig.dynamic.pooltable.PoolEntry

NAT address range entry.

path Parameters
first-address
required
string

Id of pool-entry

Request Body schema: application/yang-data+json

netgate.nat.natconfig.dynamic.pooltable.PoolEntry to be added or updated

object (netgate.nat.natconfig.dynamic.pooltable.PoolEntry)

NAT address range entry.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-entry": {
    }
}

removes netgate.nat.natconfig.dynamic.pooltable.PoolEntry

NAT address range entry.

path Parameters
first-address
required
string

Id of pool-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/dynamic/pool-table/pool-entry=%7Bfirst-address%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.nat.natconfig.GlobalOptions

NAT global options

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/global-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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:global-options": {
    }
}

creates netgate.nat.natconfig.GlobalOptions

NAT global options

Request Body schema: application/yang-data+json

netgate.nat.natconfig.GlobalOptions to be added to list

object (netgate.nat.natconfig.globaloptions.Timeouts)

NAT global timeouts

object (netgate.nat.natconfig.globaloptions.Nat44)

NAT44 options

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:timeouts": {
    },
  • "netgate-nat:nat44": {
    }
}

creates or updates netgate.nat.natconfig.GlobalOptions

NAT global options

Request Body schema: application/yang-data+json

netgate.nat.natconfig.GlobalOptions to be added or updated

object (netgate.nat.natconfig.GlobalOptions)

NAT global options

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:global-options": {
    }
}

removes netgate.nat.natconfig.GlobalOptions

NAT global options

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/global-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))

}

returns netgate.nat.natconfig.globaloptions.Nat44

NAT44 options

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/global-options/nat44"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:nat44": {
    }
}

creates netgate.nat.natconfig.globaloptions.Nat44

NAT44 options

Request Body schema: application/yang-data+json

netgate.nat.natconfig.globaloptions.Nat44 to be added to list

netgate-nat:out2in-dpo
boolean

If 'true', out2in DPO is enabled.

netgate-nat:max-translations-per-thread
integer <int64>
Default: 128000

Maximum number of sessions per thread.

netgate-nat:max-users-per-thread
integer <int64>

Maximum number of users per thread.

netgate-nat:static-mapping-only
boolean

If 'true', static mapping only is enabled.

netgate-nat:endpoint-dependent
boolean

If 'true', endpoint-dependent mode is enabled.

netgate-nat:max-translations-per-user
integer <int64>

Maximum number of sessions per user.

netgate-nat:forwarding-enabled
boolean

NAT44 forwarding option. Used 'true' or 'false'.

netgate-nat:enabled
boolean
Default: false

If 'true', NAT44 is enabled.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:out2in-dpo": true,
  • "netgate-nat:max-translations-per-thread": 128000,
  • "netgate-nat:max-users-per-thread": 0,
  • "netgate-nat:static-mapping-only": true,
  • "netgate-nat:endpoint-dependent": true,
  • "netgate-nat:max-translations-per-user": 0,
  • "netgate-nat:forwarding-enabled": true,
  • "netgate-nat:enabled": false
}

creates or updates netgate.nat.natconfig.globaloptions.Nat44

NAT44 options

Request Body schema: application/yang-data+json

netgate.nat.natconfig.globaloptions.Nat44 to be added or updated

object (netgate.nat.natconfig.globaloptions.Nat44)

NAT44 options

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:nat44": {
    }
}

removes netgate.nat.natconfig.globaloptions.Nat44

NAT44 options

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/global-options/nat44"

	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.nat.natconfig.globaloptions.Timeouts

NAT global timeouts

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/global-options/timeouts"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:timeouts": {
    }
}

creates netgate.nat.natconfig.globaloptions.Timeouts

NAT global timeouts

Request Body schema: application/yang-data+json

netgate.nat.natconfig.globaloptions.Timeouts to be added to list

netgate-nat:udp
integer <int64>

NAT UDP idle-timeout

netgate-nat:tcp_established
integer <int64>

NAT TCP established connection idle-timeout

netgate-nat:icmp
integer <int64>

NAT ICMP idle-timeout

netgate-nat:tcp_transitory
integer <int64>

NAT TCP transitory connection idle-timeout

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:udp": 0,
  • "netgate-nat:tcp_established": 0,
  • "netgate-nat:icmp": 0,
  • "netgate-nat:tcp_transitory": 0
}

creates or updates netgate.nat.natconfig.globaloptions.Timeouts

NAT global timeouts

Request Body schema: application/yang-data+json

netgate.nat.natconfig.globaloptions.Timeouts to be added or updated

object (netgate.nat.natconfig.globaloptions.Timeouts)

NAT global timeouts

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:timeouts": {
    }
}

removes netgate.nat.natconfig.globaloptions.Timeouts

NAT global timeouts

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/global-options/timeouts"

	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.nat.natconfig.Ipfix

IPFIX information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/ipfix"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:ipfix": {
    }
}

creates netgate.nat.natconfig.Ipfix

IPFIX information.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.Ipfix to be added to list

object (netgate.nat.natconfig.ipfix.Logging)

IPFIX logging information.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:logging": {
    }
}

creates or updates netgate.nat.natconfig.Ipfix

IPFIX information.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.Ipfix to be added or updated

object (netgate.nat.natconfig.Ipfix)

IPFIX information.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:ipfix": {
    }
}

removes netgate.nat.natconfig.Ipfix

IPFIX information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/ipfix"

	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.nat.natconfig.ipfix.Logging

IPFIX logging information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/ipfix/logging"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:logging": {
    }
}

creates netgate.nat.natconfig.ipfix.Logging

IPFIX logging information.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.ipfix.Logging to be added to list

netgate-nat:enable
boolean

If logging is enabled for this domain and port, this value will be true.

netgate-nat:src-port
integer <int32>
Default: 4739

The logging source port id.

netgate-nat:domain
integer <int64>
Default: 1

The logging domain id.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:enable": true,
  • "netgate-nat:src-port": 4739,
  • "netgate-nat:domain": 1
}

creates or updates netgate.nat.natconfig.ipfix.Logging

IPFIX logging information.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.ipfix.Logging to be added or updated

object (netgate.nat.natconfig.ipfix.Logging)

IPFIX logging information.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:logging": {
    }
}

removes netgate.nat.natconfig.ipfix.Logging

IPFIX logging information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/ipfix/logging"

	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.nat.natconfig.Nat64

NAT for IPv6/IPv4.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/nat64"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:nat64": {
    }
}

creates netgate.nat.natconfig.Nat64

NAT for IPv6/IPv4.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.Nat64 to be added to list

object (netgate.map.natstate.nat64.Map)

State for MAP-E and MAP-t translations.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-map:map": {
    }
}

creates or updates netgate.nat.natconfig.Nat64

NAT for IPv6/IPv4.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.Nat64 to be added or updated

object (netgate.nat.natconfig.Nat64)

NAT for IPv6/IPv4.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:nat64": {
    }
}

removes netgate.nat.natconfig.Nat64

NAT for IPv6/IPv4.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/nat64"

	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.nat.natconfig.Static

Static mapping information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/static"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:static": {
    }
}

creates netgate.nat.natconfig.Static

Static mapping information.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.Static to be added to list

object (netgate.nat.natconfig.static.MappingTable)

NAT mapping table.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:mapping-table": {
    }
}

creates or updates netgate.nat.natconfig.Static

Static mapping information.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.Static to be added or updated

object (netgate.nat.natconfig.Static)

Static mapping information.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:static": {
    }
}

removes netgate.nat.natconfig.Static

Static mapping information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/static"

	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.nat.natconfig.static.MappingTable

NAT mapping table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/static/mapping-table"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:mapping-table": {
    }
}

creates netgate.nat.natconfig.static.MappingTable

NAT mapping table.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.static.MappingTable to be added to list

Array of objects (netgate.nat.natconfig.static.mappingtable.MappingEntry)

NAT Mapping Entry.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:mapping-entry": [
    ]
}

creates or updates netgate.nat.natconfig.static.MappingTable

NAT mapping table.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.static.MappingTable to be added or updated

object (netgate.nat.natconfig.static.MappingTable)

NAT mapping table.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:mapping-table": {
    }
}

removes netgate.nat.natconfig.static.MappingTable

NAT mapping table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/static/mapping-table"

	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.nat.natconfig.static.mappingtable.MappingEntry

NAT Mapping Entry.

Request Body schema: application/yang-data+json

netgate.nat.natconfig.static.mappingtable.MappingEntry to be added to list

netgate-nat:route-table-name
string

The name of a Route Table.

netgate-nat:external-if-name
string

The external interface of the IPv4 packet.

netgate-nat:external-port
string

The external port mapped, or wildcard 'any'.

netgate-nat:local-port
string

The local port mapped, or wildcard 'any'.

netgate-nat:external-address
string

The external IPv4 address of the IPv4 packet.

netgate-nat:transport-protocol
string (netgate.nat.NatIpv4ProtocolAny)
Enum: "icmp" "udp" "tcp" "any"
netgate-nat:out-to-in-only
boolean

Match only out-to-in direction.

netgate-nat:twice-nat
boolean

NAT translate external address and port for 1:1 NAPT.

netgate-nat:local-address
string

The local IPv4 address of the IPv4 packet.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:route-table-name": "string",
  • "netgate-nat:external-if-name": "string",
  • "netgate-nat:external-port": "string",
  • "netgate-nat:local-port": "string",
  • "netgate-nat:external-address": "string",
  • "netgate-nat:transport-protocol": "icmp",
  • "netgate-nat:out-to-in-only": true,
  • "netgate-nat:twice-nat": true,
  • "netgate-nat:local-address": "string"
}

returns netgate.nat.natconfig.static.mappingtable.MappingEntry

NAT Mapping Entry.

path Parameters
transport-protocol
required
string

Id of mapping-entry

local-address
required
string

Id of mapping-entry

local-port
required
string

Id of mapping-entry

external-address
required
string

Id of mapping-entry

external-port
required
string

Id of mapping-entry

route-table-name
required
string

Id of mapping-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/static/mapping-table/mapping-entry=%7Btransport-protocol%7D,%7Blocal-address%7D,%7Blocal-port%7D,%7Bexternal-address%7D,%7Bexternal-port%7D,%7Broute-table-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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:mapping-entry": {
    }
}

creates or updates netgate.nat.natconfig.static.mappingtable.MappingEntry

NAT Mapping Entry.

path Parameters
transport-protocol
required
string

Id of mapping-entry

local-address
required
string

Id of mapping-entry

local-port
required
string

Id of mapping-entry

external-address
required
string

Id of mapping-entry

external-port
required
string

Id of mapping-entry

route-table-name
required
string

Id of mapping-entry

Request Body schema: application/yang-data+json

netgate.nat.natconfig.static.mappingtable.MappingEntry to be added or updated

object (netgate.nat.natconfig.static.mappingtable.MappingEntry)

NAT Mapping Entry.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-nat:mapping-entry": {
    }
}

removes netgate.nat.natconfig.static.mappingtable.MappingEntry

NAT Mapping Entry.

path Parameters
transport-protocol
required
string

Id of mapping-entry

local-address
required
string

Id of mapping-entry

local-port
required
string

Id of mapping-entry

external-address
required
string

Id of mapping-entry

external-port
required
string

Id of mapping-entry

route-table-name
required
string

Id of mapping-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-config/static/mapping-table/mapping-entry=%7Btransport-protocol%7D,%7Blocal-address%7D,%7Blocal-port%7D,%7Bexternal-address%7D,%7Bexternal-port%7D,%7Broute-table-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))

}

nat-state

returns netgate.nat.NatState

Network Address Translation (NAT) state data.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:nat-state": {
    }
}

returns netgate.nat.natstate.Dynamic

Dynamic mapping information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/dynamic"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:dynamic": {
    }
}

returns netgate.nat.natstate.dynamic.PoolIfTable

NAT interface pool table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/dynamic/pool-if-table"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-if-table": {
    }
}

returns netgate.nat.natstate.dynamic.pooliftable.IfEntry

Dynamic pool interface entries.

path Parameters
if-name
required
string

Id of if-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/dynamic/pool-if-table/if-entry=%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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:if-entry": {
    }
}

returns netgate.nat.natstate.dynamic.PoolTable

NAT address pool table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/dynamic/pool-table"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-table": {
    }
}

returns netgate.nat.natstate.dynamic.pooltable.PoolEntry

NAT pool address.

path Parameters
address
required
string

Id of pool-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/dynamic/pool-table/pool-entry=%7Baddress%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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:pool-entry": {
    }
}

returns netgate.nat.natstate.InterfaceSides

Side information for each interface.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/interface-sides"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:interface-sides": {
    }
}

returns netgate.nat.natstate.interfacesides.InterfaceSide

Side information about interfaces.

path Parameters
if-name
required
string

Id of interface-side

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/interface-sides/interface-side=%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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:interface-side": {
    }
}

returns netgate.nat.natstate.Nat64

NAT for IPv6/IPv4.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/nat64"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:nat64": {
    }
}

returns netgate.nat.natstate.Parameters

NAT configuration parameters.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/parameters"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:parameters": {
    }
}

returns netgate.nat.natstate.Static

Static mapping information.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/static"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:static": {
    }
}

returns netgate.nat.natstate.static.MappingTable

NAT mapping table.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/static/mapping-table"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:mapping-table": {
    }
}

returns netgate.nat.natstate.static.mappingtable.MappingEntry

NAT Mapping Entry.

path Parameters
transport-protocol
required
string

Id of mapping-entry

local-address
required
string

Id of mapping-entry

local-port
required
string

Id of mapping-entry

external-address
required
string

Id of mapping-entry

external-port
required
string

Id of mapping-entry

route-table-name
required
string

Id of mapping-entry

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/static/mapping-table/mapping-entry=%7Btransport-protocol%7D,%7Blocal-address%7D,%7Blocal-port%7D,%7Bexternal-address%7D,%7Bexternal-port%7D,%7Broute-table-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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:mapping-entry": {
    }
}

returns netgate.nat.natstate.Users

NAT users.

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/users"

	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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:users": {
    }
}

returns netgate.nat.natstate.users.User

NAT user.

path Parameters
route-table
required
string

Id of user

ip-address
required
string

Id of user

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/users/user=%7Broute-table%7D,%7Bip-address%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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:user": {
    }
}

returns netgate.nat.natstate.users.user.Session

NAT user session.

path Parameters
route-table
required
string

Id of user

ip-address
required
string

Id of user

index
required
integer <int64>

Id of session

Responses

Request samples

package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-nat:nat-state/users/user=%7Broute-table%7D,%7Bip-address%7D/session=%7Bindex%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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-nat:session": {
    }
}