Rule Properties



GUID as String

[read only] Unique identifier of Rule. Generated automatically when new Rule added to Rules set.

AsBinary as Variant

Gets or sets all rule properties as byte array.

Action as Integer

Gets or sets packet action for Rule:

0 - None
1 - Allow
2 - Deny

ActionsRoute as RuleRouteAction

With RuleRouteActions you can define fields of packet to replace.

ActionRouteSourceMAC as String

String representation of MAC address for replacing.

ActionRouteSourceIP as IPAddress

IP address for replacing.

ActionRouteSourceIPAuto as Boolean

If True and ActionRouteNAT=True and ActionsRoute.ChangeSourceIP=True then source IP for replacing will be detected automatically. Allowed only on Windows NT 4.0 sp 4, Windows 2000, Windows XP, Windows Server 2003 and higher OS.

ActionRouteSourcePort as Integer

Port for replacing.

ActionRouteSourcePortAuto as Boolean

If True and ActionRouteNAT=True and ActionRoute.ChangeSourcePort=True then source port for replacing will be detected automatically. Note: in the Routix NetCom implemented "smart" automatic port replacing: port replaced if original in use only. In other case port not replaced - original source port stays without changes.

ActionRouteDestMAC as String

String representation of MAC address for replacing.

ActionRouteDestIP as IPAddress

IP address for replacing.

ActionRouteDestPort as Integer

Port for replacing.

ActionRouteNAT as Boolean

Gets or sets NAT action.

True - Packet will be added to the NAT table. If IPs or Ports changed by rule - backward replacements will be made automatically by NAT table.
False - No action

ActionBandwidthType as Integer

Type of bandwidth:

0 - None
1 - Incoming
2 - Outgoing
3 - Summ of Incoming and Outgoing
4 - Both: Incoming and Outgoing

ActionBandwidth as Integer

Used, if ActionBandwidthType = 3.

Sets or gets bandwidth in BYTES PER SECOND.

(from 1024 to 131072000).

ActionBandwidthIn as Integer

Used, if ActionBandwidthType = 1 or 4.

Sets or gets Incoming bandwidth in BYTES PER SECOND.

(from 1024 to 131072000).

ActionBandwidthOut as Integer

Used, if ActionBandwidthType = 2 or 4.

Sets or gets Outgoing bandwidth in BYTES PER SECOND.

(from 1024 to 131072000).

ActionRouteBridge as Integer

Enables or disables Bridging or Redirection action.

0 - None

1 - Bridging

2 - Redirection

3 - Redirection to TCP/IP stack

ActionRouteBridgeInterfaces as RouteInterfaces

Returns object for Bridging or Redirection interfaces management.

ActionQoS as Integer

Sets or gets priority for packets.

Values can be from 0 (high) to 8 (low).

Enabled as Boolean

Gets or sets Enabled property. If False - Rule ignored.

Name as String

Name of Rule. Must be unique.

Description as String

Description of Rule.

CurrentSpeedBytes as Integer

[read only] Summ of speed of Incoming and Outgoing traffic in BYTES PER SECOND for last 10 seconds.

CurrentSpeedBytesIn as Integer

[read only] Speed of Incoming traffic in BYTES PER SECOND for last 10 seconds.

CurrentSpeedBytesOut as Integer

[read only] Speed of Outgoing traffic in BYTES PER SECOND for last 10 seconds.

CurrentSpeedPPS as Integer

[read only] Summ of speed of Incoming and Outgoing traffic in PACKETS PER SECOND for last 10 seconds.

CurrentSpeedPPSIn as Integer

[read only] Speed of Incoming traffic in PACKETS PER SECOND for last 10 seconds.

CurrentSpeedPPSOut as Integer

[read only] Speed of Outgoing traffic in PACKETS PER SECOND for last 10 seconds.

CurrentIn as Double

Incoming counter in megabytes.

CurrentOut as Double

Outgoing counter in megabytes.

LastHourIn as Double

[read only] Incoming counter for last hour (counted from start of hour) in megabytes.

LastHourOut as Double

[read only] Outgoing counter for last hour (counted from start of hour) in megabytes.

ConditionPacketsDirection as Integer

Packets direction condition:

0 - Any direction
1 - Incoming from network
2 - Outgoing to network

ConditionInterfacesOperator as Integer

Interfaces condition:

0 - Any interfaces
1 - In range
2 - NOT in range

ConditionInterfaces as RouteInterfaces

[read only] Represents interfaces list. Used together with ConditionInterfacesOperator.

Condition as Double

Traffic condition in megabytes

ConditionTime as Integer

May be this values:

0 - Ignore
1 - When incoming counter
2 - When outgoing counter
3 - When incoming AND outgoing counter
4 - When incoming OR outgoing counter

ConditionOperator as Integer

0 - Less then defined in Condition property
1 - More then defined in Condition property

CountersResetTime as Integer

0 - Do NOT reset
1 - Hour(s)
2 - Day(s)
3 - Week(s)
4 - Month(s)
5 - Year(s)

CountersResetOperand as Integer

Interval of reseting counters (hours, days, weeks, monts or years - It depends from CountersResetTime value);

CountersLastResetTime as DateTime

When counters last time reseted.

ConditionMACSource as String

Source MAC address condition. Used if ConditionMACSourceOperator equal to 1 or 2.

ConditionMACDest as String

Destination MAC address condition. Used if ConditionMACDestOperator equal to 1 or 2.

ConditionMACRangeSource as MACRange

Source MAC address range. Used if ConditionMACSourceOperator equal to 3 or 4.

ConditionMACRangeDest as MACRange

Destination MAC address range. Used if ConditionMACDestOperator equal to 3 or 4.

ConditionMACSourceOperator as Integer

0 - Any source MAC address
1 - Equal to ConditionMACSource
2 - NOT equal to ConditionMACSource
3 - In range of ConditionMACRangeSource
4 - NOT In range of ConditionMACRangeSource

ConditionMACDestOperator as Integer

0 - Any destination MAC address
1 - Equal to ConditionMACDest
2 - NOT equal to ConditionMACDest
3 - In range of ConditionMACRangeDest
4 - NOT In range of ConditionMACRangeDest

ConditionMACRevese as Boolean

If True - rule can do following:

if rule source MAC and packet source MAC comparison does not evaluates to True and rule destination MAC and packet destination MAC comparison does not evaluates to True - rule makes the reversed check with opposite source and destination addesses.

It allows to use one rule for both directions of packets.

ConditionProtocols as Protocols

[read only] Represents Protocols object. Protocols can be changed via properties of Protocols object.

ConditionProtocolsOperator as Integer

0 - Equal to ConditionProtocols set
1 - NOT equal to ConditionProtocols set

ConditionPortSource as Integer

Source port condition.

ConditionPortDest as Integer

Destination port condition.

ConditionPortsSource as Ports

Source ports condition

ConditionPortsDest as Ports

Destination ports condition

ConditionPortsSourceOperator as Integer

0 - Any source port
1 - Less than ConditionPortSource
2 - More than ConditionPortSource
3 - Equal to ConditionPortSource
4 - NOT equal to ConditionPortSource
5 - In range of ConditionPortsSource
6 - NOT in range of ConditionPortsSource

ConditionPortsDestOperator as Integer

0 - Any destination port
1 - Less than ConditionPortDest
2 - More than ConditionPortDest
3 - Equal to ConditionPortDest
4 - NOT equal to ConditionPortDest
5 - In range of ConditionPortsDest
6 - NOT in range of ConditionPortsDest

ConditionPortsRevese as Boolean

If True - rule can do following:

if rule source port(s) and packet source port comparison does not evaluates to True and rule destination port(s) and packet destination port comparison does not evaluates to True - rule makes the reversed check with opposite source and destination ports.

It allows to use one rule for both directions of packets.

CurrentTCPConnectionsCount as Integer

[read only] Returns TCP connections count for rule.

This value given from internal NAT table. For more information see "Connections"

CurrentOtherConnectionsCount as Integer

[read only] Same as "CurrentTCPConnectionsCount" but exclude TCP connections. For more information see "Connections"

CurrentIPConnectionsCount as Integer

[read only] Summ of "CurrentTCPConnectionsCount" and "CurrentOtherConnectionsCount". In other words any IP-based connections. For more information see "Connections"

ConditionTCPConnectionsOperator as Integer

0 - Any TCP connections count
1 - Less than "ConditionTCPConnectionsOperand" TCP connections count. For more information see "Connections"

ConditionOtherConnectionsOperator as Integer

0 - Any IP (exclude TCP) connections count
1 - Less than "ConditionOtherConnectionsOperand" IP (exclude TCP) connections count. For more information see "Connections"

ConditionIPConnectionsOperator as Integer

0 - Any IP connections count
1 - Less than "ConditionOtherConnectionsOperand" + "ConditionIPConnectionsOperand" IP connections count. For more information see "Connections"

ConditionTCPConnectionsOperand as Integer

Condition value for TCP connections. 0 equals to any count of connections. For more information see "Connections"

ConditionOtherConnectionsOperand as Integer

Condition value for all IP (exclude TCP) connections. 0 equals to any count of connections. For more information see "Connections"

ConditionIPConnectionsOperand as Integer

Condition value for all IP connections. 0 equals to any count of connections. For more information see "Connections"

ConditionIPSource as IPAddress

Source IP address. Used with ConditionIPOperatorSource.

ConditionIPDest as IPAddress

Destination IP address. Used with ConditionIPOperatorDest.

ConditionIPRangeSource as IPRanges

Source IP address ranges. Used with ConditionIPOperatorSource.

ConditionIPRangeDest as IPRanges

Destination IP address ranges. Used with ConditionIPOperatorDest.

ConditionIPOperatorSource as Integer

0 - Any source IP address
1 - Equal to ConditionIPSource
2 - NOT equal to ConditionIPSource
3 - In range of ConditionIPRangeSource
4 - NOT in range of ConditionIPRangeSource

ConditionIPOperatorDest as Integer

0 - Any destination IP address
1 - Equal to ConditionIPDest
2 - NOT equal to ConditionIPDest
3 - In range of ConditionIPRangeDest
4 - NOT in range of ConditionIPRangeDest

ConditionIPRevese as Boolean

If True - rule can do following:

if rule source IP(s) and packet source IP comparison does not evaluates to True and rule destination IP(s) and packet destination IP comparison does not evaluates to True - rule makes the reversed check with opposite source and destination addesses.

It allows to use one rule for both directions of packets.

ConditionTimeRanges as TimeRanges

Set of TimeRange objects.

ConditionTimeOperator as Integer

Used with ConditionTimeRanges property

0 - Any time
1 - In range
2 - NOT in range

Events as RuleEvents

[read only] With Events you can have access to scripts events, program events (actions).

MetaData as MetaData

[read only] Returns MetaData object. All values of this object saved with service configuration file and restored after service restarting (except Object (IDispatch) values - this values restored as NULL). MetaData of each Rule saved separetely.

DynBandwidthInSecondsCount as Integer

These properties used together for dynamic limiting of incoming bandwidth.

DynBandwidthInSecondsCount - count of last seconds. Value can be from 0 to 100 seconds. If 0 - bandwidth not limited;
DynBandwidthInSecondsLimit - count of incoming megabytes for the some count of seconds, defined by DynBandwidthInSecondsCount property.
DynBandwidthInSecondsSpeed - bandwidth limit value in BYTES PER SECOND.

 

Example:

'this code limit incoming bandwidth to 10 KB/s for rule if incoming traffic

'for the last 60 seconds more 5 MB.

With Rule

    .DynBandwidthInSecondsCount = 60        ' last 60 seconds

    .DynBandwidthInSecondsLimit = 5         ' 5 MB

    .DynBandwidthInSecondsSpeed = 1024 * 10 ' 10 KB/s

End With

DynBandwidthInSecondsLimit as Double

DynBandwidthInSecondsSpeed as Integer

DynBandwidthOutSecondsCount as Integer

Same as DynBandwidthInSecondsCount, DynBandwidthInSecondsLimit, DynBandwidthInSecondsSpeed but for outgoing traffic.

DynBandwidthOutSecondsLimit as Double

DynBandwidthOutSecondsSpeed as Integer

DynBandwidthInMinutesCount as Integer

Same as DynBandwidthInSecondsCount, DynBandwidthInSecondsLimit, DynBandwidthInSecondsSpeed but for some count of minutes.

DynBandwidthInMinutesLimit as Double

DynBandwidthInMinutesSpeed as Integer

DynBandwidthOutMinutesCount as Integer

Same as DynBandwidthInSecondsCount, DynBandwidthInSecondsLimit, DynBandwidthInSecondsSpeed but for some count of minutes and outgoing traffic.

DynBandwidthOutMinutesLimit as Double

DynBandwidthOutMinutesSpeed as Integer

DynBandwidthInHoursCount as Integer

Same as DynBandwidthInSecondsCount, DynBandwidthInSecondsLimit, DynBandwidthInSecondsSpeed but for some count of hours.

DynBandwidthInHoursLimit as Double

DynBandwidthInHoursSpeed as Integer

DynBandwidthOutHoursCount as Integer

Same as DynBandwidthInSecondsCount, DynBandwidthInSecondsLimit, DynBandwidthInSecondsSpeed but for some count of hours and outgoing traffic.

DynBandwidthOutHoursLimit as Double

DynBandwidthOutHoursSpeed as Integer

DynBandwidthInDaysCount as Integer

Same as DynBandwidthInSecondsCount, DynBandwidthInSecondsLimit, DynBandwidthInSecondsSpeed but for some count of days.

DynBandwidthInDaysLimit as Double

DynBandwidthInDaysSpeed as Integer

DynBandwidthOutDaysCount as Integer

Same as DynBandwidthInSecondsCount, DynBandwidthInSecondsLimit, DynBandwidthInSecondsSpeed but for some count of days and outgoing traffic.

DynBandwidthOutDaysLimit as Double

DynBandwidthOutDaysSpeed as Integer

URLGroups as StringSet

Defines list of names of URL groups for URL blocking.

ActionURLGroups as Integer

Defines URL blocking action.

0 - Do not block

1 - Block URL groups, defined by URLGroups property.

RedirectBlockedURLTo as String

Can be empty string. Defines URL to which clients will be redirected if client requests denied URL.