Home / Learn Secure SQL / Network Segmentation for Databases
Network Segmentation for Databases
Who can even reach the database, before any login is attempted.
The idea, explained simply
What it is
Network segmentation restricts, at the network level, which machines can even attempt to connect to the database server — typically only the application servers that genuinely need to, never the public internet directly.
Why it matters
A database that only accepts connections from a specific private subnet cannot be reached by an outside attacker at all, regardless of how strong or weak its account passwords are; this is a layer that exists entirely independent of application-level controls.
Mechanically speaking
Place the database in a private subnet/VPC with no public IP, configure firewall/security group rules to allow connections only from known application server addresses, and never expose the database port directly to the internet.
Shows up in
- Web application code review
- Backend development
- Database administration
This is an infrastructure/cloud configuration concern rather than a line of SQL, so no runnable example is given; cloud providers document this as "security groups", "firewall rules", or "VPC configuration" depending on the platform.
Check yourself
1. Network segmentation for a database mainly means...
A network-level restriction, independent of accounts.