{
  "title": "How to Configure Web Servers, CMS, and S3 to Comply with NIST SP 800-171 REV.2 / CMMC 2.0 Level 2 - Control - AC.L2-3.1.22",
  "date": "2026-04-13",
  "author": "Lakeridge Technologies",
  "featured_image": "/assets/images/blog/2026/4/how-to-configure-web-servers-cms-and-s3-to-comply-with-nist-sp-800-171-rev2-cmmc-20-level-2-control-acl2-3122.jpg",
  "content": {
    "full_html": "<p>AC.L2-3.1.22 in the NIST SP 800-171 / CMMC 2.0 Level 2 space requires organizations to limit, authorize, and monitor external system connections so that Controlled Unclassified Information (CUI) is only reachable by approved systems and users; this post gives practical, implementable steps for web servers, common CMS platforms (e.g., WordPress, Drupal), and AWS S3 so a small business can meet the Compliance Framework expectations.</p>\n\n<h2>Scope and key objectives</h2>\n<p>The control's practical objectives are: identify all external connections that interact with your web environment or storage; restrict those connections by network and application controls; authenticate and authorize the external endpoints and users; and log and monitor access to detect misuse. For a small business this means documenting every integration (payment gateways, external APIs, marketing platforms), applying least-privilege access, and enforcing strong encryption and logging for those flows so auditors can verify authorization and monitoring.</p>\n\n<h2>Web server configuration: hardening to limit external access</h2>\n<p>Start at the server/network layer: terminate TLS with modern ciphers (TLS 1.2/1.3 only), enforce HSTS, disable weak ciphers and protocols, and restrict allowed HTTP methods. On nginx: configure ssl_protocols TLSv1.2 TLSv1.3; add_header Strict-Transport-Security \"max-age=31536000; includeSubDomains; preload\"; and use limit_except to block methods not in use (e.g., limit_except GET POST HEAD { deny all; }). Disable directory listing, remove server tokens, and ensure server-side request forgery (SSRF) protections are in place for any server-side URL fetches. These steps reduce the attack surface for unknown external connections that could reach CUI.</p>\n\n<h3>Nginx example settings and ACL patterns</h3>\n<p>Example snippets to apply (replace placeholders): server { listen 443 ssl; ssl_certificate /etc/ssl/certs/your.crt; ssl_certificate_key /etc/ssl/private/your.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:...'; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; add_header Referrer-Policy \"no-referrer-when-downgrade\"; } and inside location /wp-admin { allow 203.0.113.0/32; deny all; } to restrict admin UI to a small set of IPs. For small businesses without stable IPs, require VPN access (see IAM/network below) rather than global admin endpoints.</p>\n\n<h2>CMS hardening and connection controls</h2>\n<p>CMS platforms are frequent vectors for external connections: plugins, webhooks, and third-party CDNs. Apply strict plugin vetting (only trusted vendors), minimal plugin count, enforce automatic updates for critical fixes, and disable features you don't use (XML-RPC in WordPress unless needed). Enforce role-based access with unique accounts (no shared \"admin\" user), use MFA for all admin users, and block admin area access from the public internet with either IP allowlists, VPN access, or Web Application Firewall (WAF) rules. For webhooks and APIs, require signed requests (HMAC) and validate origins, timestamps, and nonces to ensure only authorized external systems connect.</p>\n\n<h3>Small-business scenario: marketing site with CMS and third-party forms</h3>\n<p>Example: a marketing agency hosts a WordPress site that collects CUI-level contact information and posts leads to an external CRM. To meet AC.L2-3.1.22, the agency documents the CRM integration, implements a server-to-server webhook using a dedicated service account with scoped API permissions, secures the webhook with an HMAC key rotated quarterly, routes admin access over a company VPN, and restricts S3-hosted media buckets to only the website origin via an Origin Access Identity (OAI) or signed URLs. That single set of actions converts an uncontrolled external integration into an auditable, authorized connection.</p>\n\n<h2>AWS S3: policies, encryption, and restricting public/external access</h2>\n<p>S3 misconfiguration is a common compliance gap. Enforce “Block Public Access” at the account and bucket level (aws s3api put-public-access-block --bucket my-bucket --public-access-block-configuration BlockPublicAcls=true,BlockPublicPolicy=true,IgnorePublicAcls=true,RestrictPublicBuckets=true). Use bucket policies or VPC endpoint restrictions to allow access only from your web servers, CloudFront OAI, or specific IAM roles. Enforce server-side encryption (SSE-S3 or SSE-KMS) and bucket versioning. Example bucket policy pattern: deny any s3:GetObject or s3:PutObject unless the request originates from your CloudFront OAI or a specific VPC endpoint ID and the request uses TLS. Use short-lived pre-signed URLs for public file sharing instead of making buckets public.</p>\n\n<h2>Network, IAM, and architecture controls to limit external connections</h2>\n<p>Architectural choices reduce the number of external \"chokepoints\" to control. Prefer private backends in VPCs, use VPC endpoints for S3 to keep traffic off the public internet, terminate user-facing traffic at an ALB/CloudFront that enforces WAF, and restrict administrative access to management interfaces through a bastion host or VPN. On IAM: follow least privilege, create service roles limited to specific actions (e.g., s3:GetObject on a single bucket), require MFA for console and privileged API actions, and use short-lived STS credentials for automation. For policy enforcement, leverage AWS Organizations SCPs and AWS Config managed rules (e.g., s3-bucket-public-read-prohibited) so drift is detected and prevented.</p>\n\n<h2>Monitoring, logging, and change control</h2>\n<p>Logging and change control are required proof points for AC.L2-3.1.22. Enable CloudTrail for all accounts, S3 access logging (or CloudTrail data events for object-level actions), and web server access/error logs shipped to a central logging service or SIEM. Set alerts for anomalous access patterns: large data egress from S3, admin login from new geo-locations, or newly allowed public S3 policies. Maintain a CMDB or simple inventory that lists every external connection, the business justification, owner, and review date; include those artifacts in your compliance evidence. Regular vulnerability scans and configuration audits (monthly for internet-facing systems) help demonstrate continuous control.</p>\n\n<h2>Risks of not implementing AC.L2-3.1.22 and best practices</h2>\n<p>Failing to limit and control external connections risks accidental public exposure of CUI (e.g., open S3 buckets), data exfiltration via compromised plugins or accounts, and loss of federal contracts or fines under CMMC requirements. Best practices: maintain an external-connections register, require written/approved justifications for new external integrations, use network segmentation to limit blast radius, rotate keys frequently, and automate checks with infrastructure-as-code so secure defaults are enforced consistently. For small businesses, invest in a basic managed WAF and use cloud-native guardrails (IAM policies, SCPs, AWS Config) to get the most compliance coverage for modest cost.</p>\n\n<p>Summary: to comply with AC.L2-3.1.22, combine architecture controls (VPC endpoints, CloudFront/OAI), strong web server and CMS hardening (TLS, headers, plugin governance, admin access restrictions), strict S3 policies and encryption, least-privilege IAM, and continuous logging/monitoring—all documented in a configuration baseline and inventory of external connections; together these actions produce the technical evidence and operational posture auditors expect under the Compliance Framework while materially reducing the risk of CUI exposure for a small business.</p>",
    "plain_text": "AC.L2-3.1.22 in the NIST SP 800-171 / CMMC 2.0 Level 2 space requires organizations to limit, authorize, and monitor external system connections so that Controlled Unclassified Information (CUI) is only reachable by approved systems and users; this post gives practical, implementable steps for web servers, common CMS platforms (e.g., WordPress, Drupal), and AWS S3 so a small business can meet the Compliance Framework expectations.\n\nScope and key objectives\nThe control's practical objectives are: identify all external connections that interact with your web environment or storage; restrict those connections by network and application controls; authenticate and authorize the external endpoints and users; and log and monitor access to detect misuse. For a small business this means documenting every integration (payment gateways, external APIs, marketing platforms), applying least-privilege access, and enforcing strong encryption and logging for those flows so auditors can verify authorization and monitoring.\n\nWeb server configuration: hardening to limit external access\nStart at the server/network layer: terminate TLS with modern ciphers (TLS 1.2/1.3 only), enforce HSTS, disable weak ciphers and protocols, and restrict allowed HTTP methods. On nginx: configure ssl_protocols TLSv1.2 TLSv1.3; add_header Strict-Transport-Security \"max-age=31536000; includeSubDomains; preload\"; and use limit_except to block methods not in use (e.g., limit_except GET POST HEAD { deny all; }). Disable directory listing, remove server tokens, and ensure server-side request forgery (SSRF) protections are in place for any server-side URL fetches. These steps reduce the attack surface for unknown external connections that could reach CUI.\n\nNginx example settings and ACL patterns\nExample snippets to apply (replace placeholders): server { listen 443 ssl; ssl_certificate /etc/ssl/certs/your.crt; ssl_certificate_key /etc/ssl/private/your.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:...'; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff; add_header Referrer-Policy \"no-referrer-when-downgrade\"; } and inside location /wp-admin { allow 203.0.113.0/32; deny all; } to restrict admin UI to a small set of IPs. For small businesses without stable IPs, require VPN access (see IAM/network below) rather than global admin endpoints.\n\nCMS hardening and connection controls\nCMS platforms are frequent vectors for external connections: plugins, webhooks, and third-party CDNs. Apply strict plugin vetting (only trusted vendors), minimal plugin count, enforce automatic updates for critical fixes, and disable features you don't use (XML-RPC in WordPress unless needed). Enforce role-based access with unique accounts (no shared \"admin\" user), use MFA for all admin users, and block admin area access from the public internet with either IP allowlists, VPN access, or Web Application Firewall (WAF) rules. For webhooks and APIs, require signed requests (HMAC) and validate origins, timestamps, and nonces to ensure only authorized external systems connect.\n\nSmall-business scenario: marketing site with CMS and third-party forms\nExample: a marketing agency hosts a WordPress site that collects CUI-level contact information and posts leads to an external CRM. To meet AC.L2-3.1.22, the agency documents the CRM integration, implements a server-to-server webhook using a dedicated service account with scoped API permissions, secures the webhook with an HMAC key rotated quarterly, routes admin access over a company VPN, and restricts S3-hosted media buckets to only the website origin via an Origin Access Identity (OAI) or signed URLs. That single set of actions converts an uncontrolled external integration into an auditable, authorized connection.\n\nAWS S3: policies, encryption, and restricting public/external access\nS3 misconfiguration is a common compliance gap. Enforce “Block Public Access” at the account and bucket level (aws s3api put-public-access-block --bucket my-bucket --public-access-block-configuration BlockPublicAcls=true,BlockPublicPolicy=true,IgnorePublicAcls=true,RestrictPublicBuckets=true). Use bucket policies or VPC endpoint restrictions to allow access only from your web servers, CloudFront OAI, or specific IAM roles. Enforce server-side encryption (SSE-S3 or SSE-KMS) and bucket versioning. Example bucket policy pattern: deny any s3:GetObject or s3:PutObject unless the request originates from your CloudFront OAI or a specific VPC endpoint ID and the request uses TLS. Use short-lived pre-signed URLs for public file sharing instead of making buckets public.\n\nNetwork, IAM, and architecture controls to limit external connections\nArchitectural choices reduce the number of external \"chokepoints\" to control. Prefer private backends in VPCs, use VPC endpoints for S3 to keep traffic off the public internet, terminate user-facing traffic at an ALB/CloudFront that enforces WAF, and restrict administrative access to management interfaces through a bastion host or VPN. On IAM: follow least privilege, create service roles limited to specific actions (e.g., s3:GetObject on a single bucket), require MFA for console and privileged API actions, and use short-lived STS credentials for automation. For policy enforcement, leverage AWS Organizations SCPs and AWS Config managed rules (e.g., s3-bucket-public-read-prohibited) so drift is detected and prevented.\n\nMonitoring, logging, and change control\nLogging and change control are required proof points for AC.L2-3.1.22. Enable CloudTrail for all accounts, S3 access logging (or CloudTrail data events for object-level actions), and web server access/error logs shipped to a central logging service or SIEM. Set alerts for anomalous access patterns: large data egress from S3, admin login from new geo-locations, or newly allowed public S3 policies. Maintain a CMDB or simple inventory that lists every external connection, the business justification, owner, and review date; include those artifacts in your compliance evidence. Regular vulnerability scans and configuration audits (monthly for internet-facing systems) help demonstrate continuous control.\n\nRisks of not implementing AC.L2-3.1.22 and best practices\nFailing to limit and control external connections risks accidental public exposure of CUI (e.g., open S3 buckets), data exfiltration via compromised plugins or accounts, and loss of federal contracts or fines under CMMC requirements. Best practices: maintain an external-connections register, require written/approved justifications for new external integrations, use network segmentation to limit blast radius, rotate keys frequently, and automate checks with infrastructure-as-code so secure defaults are enforced consistently. For small businesses, invest in a basic managed WAF and use cloud-native guardrails (IAM policies, SCPs, AWS Config) to get the most compliance coverage for modest cost.\n\nSummary: to comply with AC.L2-3.1.22, combine architecture controls (VPC endpoints, CloudFront/OAI), strong web server and CMS hardening (TLS, headers, plugin governance, admin access restrictions), strict S3 policies and encryption, least-privilege IAM, and continuous logging/monitoring—all documented in a configuration baseline and inventory of external connections; together these actions produce the technical evidence and operational posture auditors expect under the Compliance Framework while materially reducing the risk of CUI exposure for a small business."
  },
  "metadata": {
    "description": "Practical, step-by-step guidance to configure web servers, CMS platforms, and AWS S3 storage so external connections are limited, authorized, and monitored to meet NIST SP 800-171 Rev.2 / CMMC 2.0 AC.L2-3.1.22.",
    "permalink": "/how-to-configure-web-servers-cms-and-s3-to-comply-with-nist-sp-800-171-rev2-cmmc-20-level-2-control-acl2-3122.json",
    "categories": [],
    "tags": []
  }
}