Skip to content

[firewall rules] Additional documentation for filters in the API #6032

@karencfv

Description

@karencfv

Not sure if this is the right repo for this issue, happy to move it if it belongs elsewhere.

I have some firewall rules that don't specify any ports in the filters:

$ oxide vpc firewall-rules view --vpc fa59febf-92a0-4eb7-8eae-0ff62258502b
success
VpcFirewallRules {
    rules: [
        VpcFirewallRule {
            action: Allow,
            description: "allow all connections from anywhere",
            direction: Inbound,
            filters: VpcFirewallRuleFilter {
                hosts: None,
                ports: None,
                protocols: Some(
                    [
                        Icmp,
                        Tcp,
                        Udp,
                    ],
                ),
            },
            id: 9714b9bc-b4d5-4023-bc83-123222ada61e,
            name: Name(
                "allow-all",
            ),
            priority: 65533,
            status: Enabled,
            targets: [
                Vpc(
                    Name(
                        "calico-test",
                    ),
                ),
            ],
            time_created: 2024-07-10T05:32:26.683745Z,
            time_modified: 2024-07-10T05:32:26.683745Z,
            vpc_id: fa59febf-92a0-4eb7-8eae-0ff62258502b,
        },
        VpcFirewallRule {
            action: Allow,
            description: "allow all outbound traffic to anywhere",
            direction: Outbound,
            filters: VpcFirewallRuleFilter {
                hosts: None,
                ports: None,
                protocols: Some(
                    [
                        Icmp,
                        Tcp,
                        Udp,
                    ],
                ),
            },
            id: 29d53e48-b79d-444a-b91f-3e5996798e98,
            name: Name(
                "allow-internal-outbound",
            ),
            priority: 65534,
            status: Enabled,
            targets: [
                Vpc(
                    Name(
                        "calico-test",
                    ),
                ),
            ],
            time_created: 2024-07-10T05:32:26.683753Z,
            time_modified: 2024-07-10T05:32:26.683753Z,
            vpc_id: fa59febf-92a0-4eb7-8eae-0ff62258502b,
        },
    ],
}

When i try to connect using port 80 the connection is refused

$ nc -v 45.154.216.153 80
nc: connect to 45.154.216.153 port 80 (tcp) failed: Connection refused

When I try to connect using port 22 the connection succeeds

$ nc -v 45.154.216.153 22
Connection to 45.154.216.153 22 port [tcp/ssh] succeeded!
SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.3

Is this expected? It feels a bit odd to have some ports enabled by default and others not

Metadata

Metadata

Assignees

No one assigned

    Labels

    networkingRelated to the networking.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions