How to Configure Drone Port Private Limited

Published
Length
3 min read

Luis Felipe Dias

All posts

A drone port private limited setup controls how build runners talk to private network hosts. You set it up safely by locking down runner ports and scoping network rules. In Drone CI setups, the server and runners use specific network ports to talk. When you run builds in a private setup, open ports create huge risks. You must limit which hosts and users can reach those internal ports. Good rules keep bad actors out of your build pipelines and servers. How a drone port private limited setup wo

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

A drone port private limited setup controls how build runners talk to private network hosts. You set it up safely by locking down runner ports and scoping network rules.

In Drone CI setups, the server and runners use specific network ports to talk. When you run builds in a private setup, open ports create huge risks. You must limit which hosts and users can reach those internal ports. Good rules keep bad actors out of your build pipelines and servers.

How a drone port private limited setup works

In a drone port private limited design, build agents stay inside private subnets. The main server sends jobs to runners over an internal network port. Only approved runners and admin users should ever reach this port. Workloads inside the build steps also use private ports to reach databases.

Start with safe defaults when you set up your network rules. Block all incoming traffic from the public web to your runner ports. Allow traffic only from the exact IP address of your main server. Use encrypted transport for all traffic between the server and the runners.

You also need to limit which containers can bind to host ports. A bad build script might try to open a port on the host. Set up your container runtime so jobs run with low user rights. Disable host network mode for all standard build steps in your pipelines. This step stops a build job from sniffing local network traffic.

Next, separate your build runners by team or project risk level. Give production deploy runners their own private subnet and strict port rules. Keep test runners in a separate zone with no path to production. This layout limits damage if a test build runs bad code.

Checking rules and limits of static port setups

After you set up your port rules, you must check them often. Run network scans from outside the subnet to test your firewall rules. Check that unapproved hosts cannot reach the server or runner ports. Review your container settings to make sure privileged mode stays off.

End-to-End Encryption + Virtual Private Database: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Good logging is also key when you manage private build networks. Turn on flow logs for the subnets that hold your build runners. Log every login attempt and job start event on the main server. Send these logs to a central store so your security team can read them.

Still, static port rules and network checks only solve part of the problem. Once a runner or user logs in, network firewalls stop watching the traffic. A valid runner with an open port can still run harmful commands. If a build job gets database keys, it can read all tables.

Static setups also rely on long-lived shared keys stored in the build tool. If an engineer leaks a key, anyone on that subnet can use it. Network port rules cannot see which person triggered the build job. They also cannot mask private data like emails, phone numbers, or card numbers. When a job queries a database, raw results flow back to the build log. To fix this, teams need controls that check identity and commands in real time.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Why should we hide build runner ports from the public web?

Open runner ports let attackers send fake build jobs or steal secrets. Keeping ports on a private network stops outside scans and direct attacks.

How do we stop build containers from opening host ports?

Turn off privileged mode and block host network settings in your runner setup. This forces each build step to stay inside its own isolated network space.

What risks remain after we lock down private build ports?

Approved runners and users can still run bad queries or leak raw data. Port rules cannot check individual commands or rewrite sensitive fields in query results.

The query runs. The emails stay hidden.