Inbound network access is only available for workloads of types
serverless, standard, and stateful. For other workload types, only outbound firewall settings are relevant.External
The external firewall is used to control Internet traffic to/from a workload.YAML
Inbound Requests
- By default, all inbound requests are disabled.
- Access is granted by explicitly adding one or more IPv4 / IPv6 / CIDR addresses or allowing all addresses.
- Using the UI:
- Multiple addresses can be entered within the textbox by delimiting each address with either a comma or space.
- An import file can be uploaded containing each address on its own line or delimited with either a comma or space.
Outbound Requests
- By default, all outbound requests are disabled.
- By default, or by specifying NO outbound ports, all are ALLOWED.
- When outbound ports are specified, only traffic to those ports will be allowed.
- Access is granted by explicitly adding one or more IPv4 / IPv6 / CIDR addresses or public hostnames or allowing all addresses / hostnames.
- When using a hostname, only ports 80, 443, and 445 will be reachable. To allow all ports, enable all outbound requests.
- When using an IP or CIDR, all ports will be reachable.
- The IP/CIDR addresses takes precedence over hostnames.
- Using the UI:
- Multiple addresses can be entered within the textbox by delimiting each address with either a comma or space.
- An import file can be uploaded containing each address on its own line or delimited with either a comma or space.
Blocked Addresses
All addresses specified will be blocked from outbound/inbound requests to/from this workloadYAML
- Blocking an address has the same effect as not including it in the allow CIDR list
Inbound HTTP Header Filter
UseinboundHeaderFilter to allow or block inbound requests based on their HTTP headers. It is set under spec.firewallConfig.external.http.
YAML
key) and sets either allowedValues or blockedValues, not both. A request is checked as follows:
- Blocked values: a request is rejected if any
blockedValuespattern matches its header. Blocked values take precedence over allowed values. - Allowed values: once any entry has
allowedValues, a request must match at least one allowed value to be accepted. A request that lacks the header is rejected. When several headers have allowed values, matching any one of them is enough. - Rejected requests receive
403with the bodyRBAC: access denied. A rejected gRPC request (content typeapplication/grpc) receivesgrpc-status: 7(PERMISSION_DENIED) with the messageRBAC: access denied.
- Values are RE2 regular expressions, and each must match the whole header value.
barmatchesbar, but notbarbellorxbar. No^or$is needed. - Header names are case-insensitive. Header values are case-sensitive.
- Only to requests that arrive through the workload’s public endpoint, including requests from other workloads that call that endpoint. Requests to the workload’s internal address (
<workload>.<gvc>.cpln.local), from any GVC, are not filtered. - Only to containers with an
http,http2orgrpcport. It has no effect on atcpport.
- Use one entry per header, and list several values under it. If two entries share the same
key, only the first is kept. keymust be a valid HTTP header name (no spaces or colons). An invalid name is accepted, but in an allow rule it rejects every request.
Examples
Only allow requests that have thefoo header, with any value:
YAML
foo: bar:
YAML
x-client header is web or mobile, and block one user agent:
YAML
bar even when the header is sent more than once or as a list (foo: zzz, bar):
YAML
Geo Filtering
The header filter can use the geo location headers that the load balancer adds to each request. The country header contains the two-letter ISO country code (for exampleUS), not the country name.
This example only allows requests from the United States:
YAML
Internal
The internal firewall is used to control access between other workloads within an org. Only the ports listed in the workload containers array will be made accessible to other workloads. This example allows workloads running in the same GVC to access this workload.YAML
YAML
YAML
none: No access is allowed between workloads.same-gvc: Workloads running in the same GVC are accessible. AddinginboundAllowWorkloadalongside it also allows the workloads named there, which may live in other GVCs. The Console shows that combination asSame GVC & Workload List, but it is stored assame-gvcwith a populated list, not as a separate value.same-org: Workloads running in the same org are accessible.workload-list: Specific workloads are allowed to access this workload.- These workloads can be from the same or different GVCs.
- The user configuring this setting must have the
viewpermission, set within a policy, on the workload being specified. - Use
inboundAllowWorkloadto list out the allowed workloads using their links.