Documentation ¶
Overview ¶
Package nat is the client.Policies.Nat namespace.
Normalized object: Entry
Index ¶
- Constants
- type Entry
- type FwNat
- func (c *FwNat) Delete(vsys string, e ...interface{}) error
- func (c *FwNat) Edit(vsys string, e Entry) error
- func (c *FwNat) Get(vsys, name string) (Entry, error)
- func (c *FwNat) GetList(vsys string) ([]string, error)
- func (c *FwNat) Initialize(con util.XapiClient)
- func (c *FwNat) MoveGroup(vsys string, mvt int, rule string, e ...Entry) error
- func (c *FwNat) Set(vsys string, e ...Entry) error
- func (c *FwNat) Show(vsys, name string) (Entry, error)
- func (c *FwNat) ShowList(vsys string) ([]string, error)
- type PanoNat
- func (c *PanoNat) Delete(dg, base string, e ...interface{}) error
- func (c *PanoNat) Edit(dg, base string, e Entry) error
- func (c *PanoNat) Get(dg, base, name string) (Entry, error)
- func (c *PanoNat) GetList(dg, base string) ([]string, error)
- func (c *PanoNat) Initialize(con util.XapiClient)
- func (c *PanoNat) MoveGroup(dg, base string, mvt int, rule string, e ...Entry) error
- func (c *PanoNat) Set(dg, base string, e ...Entry) error
- func (c *PanoNat) Show(dg, base, name string) (Entry, error)
- func (c *PanoNat) ShowList(dg, base string) ([]string, error)
Constants ¶
const ( DynamicIpAndPort = "dynamic-ip-and-port" DynamicIp = "dynamic-ip" StaticIp = "static-ip" )
Values for Entry.SatType.
const ( InterfaceAddress = "interface-address" TranslatedAddress = "translated-address" )
Values for Entry.SatAddressType.
const ( Ip = "ip" FloatingIp = "floating" )
These are the valid settings for Entry.SatFallbackIpType.
const ( DatTypeStatic = "destination-translation" DatTypeDynamic = "dynamic-destination-translation" )
These are valid settings for DatType.
const ( TypeIpv4 = "ipv4" TypeNat64 = "nat64" TypeNptv6 = "nptv6" )
Valid values for the Type value.
const None = "none"
None is a valid value for both Entry.SatType and Entry.SatAddressType.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { Name string Description string Type string SourceZones []string // unordered DestinationZone string ToInterface string Service string SourceAddresses []string // unordered DestinationAddresses []string // unordered SatType string SatAddressType string SatTranslatedAddresses []string // unordered SatInterface string SatIpAddress string SatFallbackType string SatFallbackTranslatedAddresses []string // unordered SatFallbackInterface string SatFallbackIpType string SatFallbackIpAddress string SatStaticTranslatedAddress string SatStaticBiDirectional bool DatType string DatAddress string DatPort int DatDynamicDistribution string // 8.1+ Disabled bool Targets map[string][]string NegateTarget bool Tags []string // ordered }
Entry is a normalized, version independent representation of a NAT policy. The prefix "Sat" stands for "Source Address Translation" while the prefix "Dat" stands for "Destination Address Translation".
Targets is a map where the key is the serial number of the target device and the value is a list of specific vsys on that device. The list of vsys is nil if all vsys on that device should be included or if the device is a virtual firewall (and thus only has vsys1).
The following Sat params are linked:
SatType = nat.DynamicIpAndPort && SatAddressType = nat.TranslatedAddress:
- SatTranslatedAddresses
SatType = nat.DynamicIpAndPort && SatAddressType = nat.InterfaceAddress:
- SatInterface
- SatIpAddress
For ALL SatType = nat.DynamicIp:
- SatTranslatedAddresses
For ALL SatType = nat.DynamicIp and SatFallbackType = nat.InterfaceAddress:
- SatFallbackInterface
SatType = nat.DynamicIp && SatFallbackType = nat.InterfaceAddress && SatFallbackIpType = nat.Ip:
- SatFallbackIpAddress
SatType = nat.DynamicIp && SatFallbackType = nat.InterfaceAddress && SatFallbackIpType = nat.FloatingIp:
- SatFallbackIpAddress
SatType = nat.DynamicIp and SatFallbackType = nat.TranslatedAddress:
- SatFallbackTranslatedAddresses
SatType = nat.StaticIp:
- SatStaticTranslatedAddress
- SatStaticBiDirectional
If both DatAddress and DatPort are unintialized, then no destination address translation will be enabled; setting DatType by itself is not good enough.
type FwNat ¶
type FwNat struct {
// contains filtered or unexported fields
}
FwNat is the client.Policies.Nat namespace.
func (*FwNat) Delete ¶
Delete removes the given NAT policies.
NAT policies can be either a string or an Entry object.
func (*FwNat) Initialize ¶
func (c *FwNat) Initialize(con util.XapiClient)
Initialize is invoed by client.Initialize().
func (*FwNat) MoveGroup ¶
MoveGroup moves a logical group of NAT rules somewhere in relation to another rule.
type PanoNat ¶
type PanoNat struct {
// contains filtered or unexported fields
}
PanoNat is the client.Policies.Nat namespace.
func (*PanoNat) Delete ¶
Delete removes the given NAT policies.
NAT policies can be either a string or an Entry object.
func (*PanoNat) Initialize ¶
func (c *PanoNat) Initialize(con util.XapiClient)
Initialize is invoed by client.Initialize().
func (*PanoNat) MoveGroup ¶
MoveGroup moves a logical group of NAT rules somewhere in relation to another rule.