Firewalls and Proxy Servers

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams set up firewalls and proxy servers to filter network traffic by IP and port. A firewall blocks bad packets, while a forward or reverse server routes approved user requests. Most teams place these network controls at the edge of their cloud networks. When network rules and user roles are too broad, anyone inside can run risky commands. How firewalls and proxy servers filter network traffic A network firewall checks every packet that tries to cross your network boundary. It reads the sour

Database Proxy (ProxySQL, PgBouncer) + SSH Bastion Hosts / Jump Servers: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

Teams set up firewalls and proxy servers to filter network traffic by IP and port. A firewall blocks bad packets, while a forward or reverse server routes approved user requests. Most teams place these network controls at the edge of their cloud networks. When network rules and user roles are too broad, anyone inside can run risky commands.

How firewalls and proxy servers filter network traffic

A network firewall checks every packet that tries to cross your network boundary. It reads the source IP address, the destination IP address, and the target port number. If the packet matches an allow rule, the firewall lets the traffic pass through. If the packet does not match a rule, the firewall drops it right away.

Stateful firewalls also track active sessions across your private and public subnets. They remember which inside host started a call to an outside server. When the outside server replies, the firewall lets the return packets back in. This setup keeps outside hosts from starting new links to your private servers.

Standard network intermediary servers sit between client apps and target systems to route traffic. A forward server takes outbound web calls from internal apps and sends them out. It hides the internal IP address of the client from the outside world. A reverse server sits in front of internal web apps and takes public traffic. It checks the request path and sends the call to the right backend server.

Why network rules and roles leave a gap in flight

Network edge tools do a great job of blocking unknown hosts from your subnets. They shrink the attack surface by hiding private IP addresses and closing unused ports. When you pair them with native database roles, you control who can log in. Only approved hosts and valid user accounts can start a session with the server.

Still, this setup only decides who can open a socket and log in. Once the session starts, the firewall sees only a stream of encrypted bytes. It cannot read the database queries or shell commands inside that valid session. Native roles also tend to grow too broad as engineers ask for more access.

Database Proxy (ProxySQL, PgBouncer) + SSH Bastion Hosts / Jump Servers: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

An engineer often needs write permissions to fix one bad row during an outage. If you grant a broad write role, they can also drop a whole table. Standard network filters cannot tell a safe read query from a huge data dump. They also cannot rewrite sensitive fields like emails, phone numbers, or card numbers in results.

How to tighten network rules and native permissions

Start by locking down your firewall rules to the smallest possible IP ranges. Never leave database or admin ports open to the whole internet. Allow inbound traffic only from known office networks or specific app subnets. Check your rule lists every month and delete old entries that teams no longer use.

Next, split your native database and server roles by daily tasks. Give engineers read-only roles for normal checks and bug hunts. Create separate write roles for schema updates and urgent fixes. Even with tight network rules, you still need a way to check individual commands in flight.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Do I need both a firewall and a reverse server?

Yes, most teams run both tools together for better security. The firewall blocks bad ports, while the reverse server routes valid web calls to apps.

Can a standard firewall block a bad SQL query?

No, a standard firewall only checks IP addresses and port numbers. Once a user logs in over an open port, the firewall ignores the queries inside.

How does data masking work on database results?

Data masking checks query results in flight for patterns like emails or national IDs. It rewrites those matched fields in the results before the client app reads them.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.