Documentation ¶
Index ¶
- func MarshalCommands(v any) (out []byte, err error)
- type Config
- type EnableDisable
- type Firewall
- type FirewallAppliedRuleSets
- type FirewallGroups
- type FirewallGroupsAddressGroup
- type FirewallGroupsDomainGroup
- type FirewallGroupsInterfaceGroup
- type FirewallGroupsMacGroup
- type FirewallGroupsNetworkGroup
- type FirewallGroupsPortGroup
- type FirewallInterface
- type FirewallRuleSet
- type FirewallRuleSetRule
- type FirewallRuleSetRuleAddressGroup
- type FirewallRuleSetRuleAddresses
- type FirewallRuleSetRuleAddressesAddress
- type FirewallRuleSetRuleConnectionStatus
- type FirewallRuleSetRuleConnectionStatusNAT
- type FirewallRuleSetRuleFragment
- type FirewallRuleSetRuleGeoIP
- type FirewallRuleSetRuleICMP
- type FirewallRuleSetRuleIPSec
- type FirewallRuleSetRuleInterface
- type FirewallRuleSetRuleLimit
- type FirewallRuleSetRuleRecent
- type FirewallRuleSetRuleState
- type FirewallRuleSetRuleTCP
- type FirewallRuleSetRuleTCPFlags
- type FirewallRuleSetRuleTTL
- type FirewallRuleSetRuleTime
- type FirewallStatePolicies
- type FirewallStatePolicy
- type FirewallZone
- type FirewallZoneFrom
- type FirewallZoneIntraZoneFiltering
- type IPAddr
- type IPPrefix
- type Marshaler
- type ValueOrRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalCommands ¶
Types ¶
type EnableDisable ¶
type EnableDisable bool
func (EnableDisable) MarshalText ¶
func (e EnableDisable) MarshalText() ([]byte, error)
func (EnableDisable) String ¶
func (e EnableDisable) String() string
type Firewall ¶
type Firewall struct { AllPing *EnableDisable `yaml:"allPing" json:"allPing"` BroadcastPing *EnableDisable `yaml:"broadcastPing" json:"broadcastPing"` ConfigTrap *EnableDisable `yaml:"configTrap" json:"configTrap"` Groups FirewallGroups `vyos:"group" json:"groups"` Interfaces map[string]FirewallInterface `vyos:"interface" json:"interfaces"` SrcRouteV4 *EnableDisable `vyos:"ip-src-route" yaml:"srcRouteV4" json:"srcRouteV4"` SrcRouteV6 *EnableDisable `vyos:"ipv6-src-route" yaml:"srcRouteV6" json:"srcRouteV6"` LogMartians *EnableDisable `yaml:"logMartians" json:"logMartians"` NamesV4 map[string]FirewallRuleSet `vyos:"name" yaml:"namesV4" json:"namesV4"` NamesV6 map[string]FirewallRuleSet `vyos:"ipv6-name" yaml:"namesV6" json:"namesV6"` ReceiveRedirects *EnableDisable `yaml:"receiveRedirects" json:"receiveRedirects"` ResolverCache bool `yaml:"resolverCache" json:"resolverCache"` ResolverInterval *uint16 `yaml:"resolverInterval" json:"resolverInterval"` SendRedirects *EnableDisable `yaml:"sendRedirects" json:"sendRedirects"` SourceValidation *string `yaml:"sourceValidation" json:"sourceValidation"` StatePolicy FirewallStatePolicies `yaml:"statePolicy" json:"statePolicy"` SynCookies *EnableDisable `yaml:"synCookies" json:"synCookies"` TwaHazardsProtection *EnableDisable `yaml:"twaHazardsProtection" json:"twaHazardsProtection"` Zone map[string]FirewallZone `json:"zone"` }
TODO jsonschema: valid options from other objects?
type FirewallAppliedRuleSets ¶
type FirewallGroups ¶
type FirewallGroups struct { AddressGroupsV4 map[string]FirewallGroupsAddressGroup `vyos:"address-group" yaml:"addressGroupsV4" json:"addressGroupsV4"` AddressGroupsV6 map[string]FirewallGroupsAddressGroup `vyos:"ipv6-address-group" yaml:"addressGroupsV6" json:"addressGroupsV6"` NetworkGroupsV4 map[string]FirewallGroupsNetworkGroup `vyos:"network-group" yaml:"networkGroupsV4" json:"networkGroupsV4"` NetworkGroupsV6 map[string]FirewallGroupsNetworkGroup `vyos:"ipv6-network-group" yaml:"networkGroupsV6" json:"networkGroupsV6"` PortGroups map[string]FirewallGroupsPortGroup `vyos:"port-group" yaml:"portGroups" json:"portGroups"` MacGroups map[string]FirewallGroupsMacGroup `vyos:"mac-group" yaml:"macGroups" json:"macGroups"` DomainGroups map[string]FirewallGroupsDomainGroup `vyos:"domain-group" yaml:"domainGroups" json:"domainGroups"` InterfaceGroups map[string]FirewallGroupsInterfaceGroup `vyos:"interface-group" yaml:"interfaceGroups" json:"interfaceGroups"` }
type FirewallGroupsAddressGroup ¶
type FirewallGroupsAddressGroup struct { Description *string `json:"description"` Addresses []ValueOrRange[IPAddr] `vyos:"address" json:"addresses"` Includes []string `vyos:"include" json:"includes"` }
type FirewallGroupsMacGroup ¶
type FirewallGroupsMacGroup struct { Description *string `json:"description"` MacAddresses []net.HardwareAddr `vyos:"mac-address" yaml:"macAddresses" json:"macAddresses"` Includes []string `vyos:"include" json:"includes"` }
type FirewallGroupsPortGroup ¶
type FirewallGroupsPortGroup struct { Description *string `json:"description"` Ports []ValueOrRange[string] `vyos:"port" json:"ports"` Includes []string `vyos:"include" json:"includes"` }
type FirewallInterface ¶
type FirewallInterface struct { In FirewallAppliedRuleSets `json:"in"` Out FirewallAppliedRuleSets `json:"out"` Local FirewallAppliedRuleSets `json:"local"` }
type FirewallRuleSet ¶
type FirewallRuleSet struct { Description *string `json:"description"` DefaultAction *string `yaml:"defaultAction" json:"defaultAction"` DefaultJumpTarget *string `yaml:"defaultJumpTarget" json:"defaultJumpTarget"` EnableDefaultLog bool `yaml:"enableDefaultLog" json:"enableDefaultLog"` Rules map[uint]FirewallRuleSetRule `vyos:"rule" json:"rules"` }
type FirewallRuleSetRule ¶
type FirewallRuleSetRule struct { Description *string `json:"description"` Action *string `json:"action"` ConnectionMarks []uint `vyos:"connection-mark" yaml:"connectionMarks" json:"connectionMarks"` ConnectionStatus FirewallRuleSetRuleConnectionStatus `yaml:"connectionStatus" json:"connectionStatus"` Destination FirewallRuleSetRuleAddresses `json:"destination"` Disable bool `json:"disable"` DSCPs []ValueOrRange[uint8] `vyos:"dscp" json:"dscps"` DSCPExcludes []ValueOrRange[uint8] `vyos:"dscp-exclude" yaml:"dscpExcludes" json:"dscpExcludes"` Fragment FirewallRuleSetRuleFragment `json:"fragment"` ICMP FirewallRuleSetRuleICMP `vyos:"icmp" json:"icmp"` ICMPV6 FirewallRuleSetRuleICMP `vyos:"icmpv6" yaml:"icmpV6" json:"icmpV6"` InboundInterface FirewallRuleSetRuleInterface `yaml:"inboundInterface" json:"inboundInterface"` IPSec FirewallRuleSetRuleIPSec `vyos:"ipsec" yaml:"ipSec" json:"ipSec"` JumpTarget *string `yaml:"jumpTarget" json:"jumpTarget"` Limit FirewallRuleSetRuleLimit `json:"limit"` Log *EnableDisable `json:"log"` LogLevel *string `yaml:"logLevel" json:"logLevel"` OutboundInterface FirewallRuleSetRuleInterface `yaml:"outboundInterface" json:"outboundInterface"` PacketLengths []ValueOrRange[uint16] `vyos:"packet-length" yaml:"packetLengths" json:"packetLengths"` PacketLengthExcludes []ValueOrRange[uint16] `vyos:"packet-length-exclude" yaml:"packetLengthExcludes" json:"packetLengthExcludes"` Protocol *string `json:"protocol"` Recent FirewallRuleSetRuleRecent `json:"recent"` Source FirewallRuleSetRuleAddresses `json:"source"` State FirewallRuleSetRuleState `json:"state"` TCP FirewallRuleSetRuleTCP `vyos:"tcp" json:"tcp"` Time FirewallRuleSetRuleTime `json:"time"` TTL FirewallRuleSetRuleTTL `vyos:"ttl" json:"ttl"` }
type FirewallRuleSetRuleAddressGroup ¶
type FirewallRuleSetRuleAddressGroup struct { AddressGroup *string `yaml:"addressGroup" json:"addressGroup"` NetworkGroup *string `yaml:"networkGroup" json:"networkGroup"` PortGroup *string `yaml:"portGroup" json:"portGroup"` MacGroup *string `yaml:"macGroup" json:"macGroup"` DomainGroup *string `yaml:"domainGroup" json:"domainGroup"` }
type FirewallRuleSetRuleAddresses ¶
type FirewallRuleSetRuleAddresses struct { Address *FirewallRuleSetRuleAddressesAddress `json:"address"` AddressMask net.IPMask `yaml:"addressMask" json:"addressMask"` FQDN *string `vyos:"fqdn" json:"fqdn"` GeoIP FirewallRuleSetRuleGeoIP `vyos:"geoip" yaml:"geoIP" json:"geoIP"` Group FirewallRuleSetRuleAddressGroup `json:"group"` MacAddress net.HardwareAddr `yaml:"macAddress" json:"macAddress"` Ports []ValueOrRange[string] `vyos:"port,csv" json:"ports"` }
type FirewallRuleSetRuleAddressesAddress ¶
type FirewallRuleSetRuleAddressesAddress struct { Address ValueOrRange[IPAddr] Negated bool }
func (FirewallRuleSetRuleAddressesAddress) JSONSchema ¶
func (FirewallRuleSetRuleAddressesAddress) JSONSchema() *jsonschema.Schema
func (FirewallRuleSetRuleAddressesAddress) MarshalText ¶
func (a FirewallRuleSetRuleAddressesAddress) MarshalText() ([]byte, error)
func (FirewallRuleSetRuleAddressesAddress) String ¶
func (a FirewallRuleSetRuleAddressesAddress) String() string
func (*FirewallRuleSetRuleAddressesAddress) UnmarshalYAML ¶
func (a *FirewallRuleSetRuleAddressesAddress) UnmarshalYAML(node *yaml.Node) error
type FirewallRuleSetRuleConnectionStatus ¶
type FirewallRuleSetRuleConnectionStatus struct {
NAT FirewallRuleSetRuleConnectionStatusNAT `vyos:"nat" json:"nat"`
}
type FirewallRuleSetRuleICMP ¶
type FirewallRuleSetRuleState ¶
type FirewallRuleSetRuleState struct { Established *EnableDisable `json:"established"` Invalid *EnableDisable `json:"invalid"` New *EnableDisable `json:"new"` Related *EnableDisable `json:"related"` }
type FirewallRuleSetRuleTCP ¶
type FirewallRuleSetRuleTCP struct { Flags FirewallRuleSetRuleTCPFlags `json:"flags"` MSS *ValueOrRange[uint16] `json:"mss"` }
type FirewallRuleSetRuleTTL ¶
type FirewallRuleSetRuleTime ¶
type FirewallRuleSetRuleTime struct { StartDate *string `vyos:"startdate" yaml:"startDate" json:"startDate"` StartTime *string `vyos:"starttime" yaml:"startTime" json:"startTime"` StopDate *string `vyos:"stopdate" yaml:"stopDate" json:"stopDate"` StopTime *string `vyos:"stoptime" yaml:"stopTime" json:"stopTime"` Weekday *ValueOrRange[string] `json:"weekday"` }
type FirewallStatePolicies ¶
type FirewallStatePolicies struct { Established FirewallStatePolicy `json:"established"` Invalid FirewallStatePolicy `json:"invalid"` Related FirewallStatePolicy `json:"related"` }
type FirewallStatePolicy ¶
type FirewallStatePolicy struct { Action *string `json:"action"` Log *EnableDisable `json:"log"` LogLevel *string `json:"logLevel"` }
type FirewallZone ¶
type FirewallZone struct { DefaultAction *string `vyos:"default-action"` Description *string `json:"description"` EnableDefaultLog bool `yaml:"enableDefaultLog" json:"enableDefaultLog"` From map[string]FirewallZoneFrom `json:"from"` Interfaces []string `vyos:"interface" json:"interfaces"` IntraZoneFiltering FirewallZoneIntraZoneFiltering `yaml:"intraZoneFiltering" json:"intraZoneFiltering"` LocalZone bool `yaml:"localZone" json:"localZone"` }
type FirewallZoneFrom ¶
type FirewallZoneFrom struct {
Firewall FirewallAppliedRuleSets `json:"firewall"`
}
type FirewallZoneIntraZoneFiltering ¶
type FirewallZoneIntraZoneFiltering struct { Action *string `json:"action"` Firewall FirewallAppliedRuleSets `json:"firewall"` }
type IPAddr ¶
func (IPAddr) JSONSchema ¶
func (IPAddr) JSONSchema() *jsonschema.Schema
type IPPrefix ¶
func (IPPrefix) JSONSchema ¶
func (IPPrefix) JSONSchema() *jsonschema.Schema
type ValueOrRange ¶
type ValueOrRange[T comparable] struct { Start T End T }
ValueOrRange is either a range or single value, if only Start is set
func (ValueOrRange[T]) JSONSchema ¶
func (ValueOrRange[T]) JSONSchema() *jsonschema.Schema
func (ValueOrRange[T]) MarshalText ¶
func (v ValueOrRange[T]) MarshalText() ([]byte, error)
func (ValueOrRange[T]) String ¶
func (v ValueOrRange[T]) String() string
func (*ValueOrRange[T]) UnmarshalYAML ¶
func (v *ValueOrRange[T]) UnmarshalYAML(node *yaml.Node) error
Click to show internal directories.
Click to hide internal directories.