How to Configure IIS Firewall Settings
Proper iis firewall settings control which networks can reach your web apps and admin ports. You set them up by limiting inbound ports and restricting remote management to trusted networks. Web servers face constant automated scans from across the public internet. Leaving default rules in place exposes admin services and test sites to outside attackers. A clean rule set keeps public traffic on web ports and blocks everything else. How iis firewall settings work in practice A Windows web serv
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.
Proper iis firewall settings control which networks can reach your web apps and admin ports. You set them up by limiting inbound ports and restricting remote management to trusted networks.
Web servers face constant automated scans from across the public internet. Leaving default rules in place exposes admin services and test sites to outside attackers. A clean rule set keeps public traffic on web ports and blocks everything else.
How iis firewall settings work in practice
A Windows web server relies on two main layers to filter network traffic. The host firewall filters packets by port, protocol, and source IP address. Inside the web server, IP and domain restrictions filter requests at the site level.
These rules affect three distinct groups of users and workloads. Public visitors need inbound routes to standard web and secure web ports. App servers and background jobs need outbound paths to reach databases and internal APIs. System admins need restricted paths for remote management tools and file deployment.
Safe defaults start with a strict deny-all rule for inbound traffic. You then open only the secure web port to public routers or load balancers. If you use a load balancer, restrict the web server to accept only its IP.
Admin ports require much tighter controls than public web ports. Never open remote management or deployment ports to the public internet. Bind those rules to a private management subnet or a specific admin host IP. Also assign rules to the private or domain network profile, not the public profile.
How to check and audit your firewall rules
After you apply new rules, test them from an outside host right away. Check that public web requests succeed over encrypted channels and fail on unencrypted ports. Next, test your admin ports from an untrusted network to confirm the firewall drops them.
End-to-End Encryption + Firewall Configuration: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Turn on firewall logging for dropped packets and successful admin connections. Send these logs to a central log store so your team can review them. Set up alerts for any changes made to host firewall rules on production servers.
Keep in mind that static firewall rules only check network addresses and ports. Once an admin connects from an allowed IP, the firewall does not inspect their actions. It cannot tell which user ran a deploy script or changed a site binding.
Shared admin credentials and broad network rules leave gaps in your audit trail. If an attacker compromises a host on the management subnet, firewall rules will allow them through. Teams also need clear visibility into individual user actions after the session starts.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Which ports do web servers need open for public traffic?
Most production web servers only need the standard encrypted web port open to users. You can also open the unencrypted web port if it redirects straight to HTTPS. Keep all file transfer, remote desktop, and management ports closed to public networks.
Should I block IP addresses in the host firewall or the web server?
Use the host firewall to protect the whole machine and block bad traffic early. Host rules drop packets before the web server spends memory or CPU on them. Use web server IP restrictions when a single site or folder needs unique rules.
How do I secure remote management for a Windows web server?
Restrict the remote management service port to specific internal IP addresses in the host firewall. Require strong user credentials and use valid TLS certificates for all management traffic. Disable remote management right away if your team manages the server through local scripts.
Related guides
In this post