
{"id":7206,"date":"2021-02-18T16:50:52","date_gmt":"2021-02-18T16:50:52","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-one\/"},"modified":"2026-11-03T19:28:13","modified_gmt":"2026-11-03T19:28:13","slug":"configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-one","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/en-gb\/blogs\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-one\/","title":{"rendered":"Configuring a per-site WAF policy with IP address restriction rules: Part one"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p>I recently worked with a client who had multiple public-facing Internet Information Services (IIS) websites hosted on an Azure\u00ae virtual machine (VM). The client wanted to restrict inbound internet access to one specific website by specifying a set of allowed external IP addresses and leave the traffic flow for the other websites unaffected.<\/p>\n<p>A common approach to achieve this is to use an Application Gateway web application firewall (WAF) in front of the target VM. Then, create a per-site WAF policy with an IP-based access control rule and assign it to the Application Gateway and the listener that corresponds to<br \/>\nthe particular website\u2019s hostname.<\/p>\n<p>An IP\u2013based access control rule is a custom WAF rule that lets you control access to your web applications. It does this by specifying a list of IP addresses or IP address ranges in Classless Inter-Domain Routing (CIDR) format<\/p>\n<p>By assigning WAF policies to a listener, you can configure WAF settings for individual sites without the changes affecting every site. The most specific policy takes precedence. Suppose there is a global policy and a per-site policy (a WAF policy associated with a listener). In that case, the per-site policy overrides the global WAF policy for that listener. Other listeners without their own policies are affected by only the global WAF policy.<\/p>\n<p>&nbsp;<br \/>\nIn this series of posts, I run through a simplified configuration to demonstrate how to apply a per-site WAF policy to an Application Gateway to control inbound access based on IP-based restrictions to one of two test IIS websites running on a single Windows VM.<\/p>\n<p>\nThe following diagram provides a conceptual illustration of my goal:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26308-body-Picture1_38.png\" alt=\"waf pic 1\" \/><\/p>\n<p><strong>Implementation walkthrough&nbsp;<\/strong><\/p>\n<p>This three-post series covers the following elements of the implementation walkthrough:<\/p>\n<p><a href=\"https:\/\/docs.rackspace.com\/blog\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-one\/\">Post 1<\/a><\/p>\n<ol>\n<li>Introduction<\/li>\n<li>Assumptions<\/li>\n<\/ol>\n<p><a href=\"https:\/\/docs.rackspace.com\/blog\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-two\/\">Post 2<\/a><\/p>\n<p>\nApplication Gateway configuration:<\/p>\n<ol>\n<li>Web application firewall<\/li>\n<li>Backend pool<\/li>\n<li>HTTP settings<\/li>\n<li>Frontend IP configurations<\/li>\n<li>Listeners<\/li>\n<li>Rules<\/li>\n<\/ol>\n<p><a href=\"https:\/\/docs.rackspace.com\/blog\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-three\/\">Post 3<\/a><\/p>\n<ol>\n<li>WAF policy configuration<\/li>\n<li>Testing the custom rule<\/li>\n<li>Conclusion<br \/>\n\t&nbsp;<\/li>\n<\/ol>\n<p><strong>Assumptions<\/strong><\/p>\n<p>The following items are already in place, so I won&#8217;t cover the provisioning steps for these items in this walkthrough:<\/p>\n<ul>\n<li>A Windows; Azure VM&nbsp;<\/li>\n<li>IIS installed and bindings configured for two test website URLs (<strong>site1.hiteshvadgama.co.uk&nbsp;<\/strong>and <strong>site2.hiteshvadgama.co.uk<\/strong>)<\/li>\n<li>An Application Gateway WAF (v2)<\/li>\n<li>DNS records updated to map website domains to the public IP address of the Application&nbsp;Gateway&nbsp;<\/li>\n<\/ul>\n<p><strong>Next steps<\/strong><\/p>\n<p><a href=\"https:\/\/docs.rackspace.com\/blog\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-two\/\">Post 2<\/a>: In this series covers the Application Gateway configuration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configuring a per-site WAF policy with IP address restriction rules: Part one<\/p>\n","protected":false},"author":2,"featured_media":7208,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26308","content_type":"blog","created_by":"10130","authored_on":"2023-11-28T16:50:52+00:00","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"by Hitesh Vadgama, Solutions Architect, Rackspace Technology","seo_description":"Set up a per-site Web Application Firewall (WAF) policy with IP address restrictions using Application Gateway. Read part 1. ","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_technical_images\/26308-insights_image-security-technical-blog-1-insights.jpg","field_partners":"","rxt_platforms":"Applications","product":"Rackspace Security Essentials","publisheddate":"2021-02-18T16:50:52","rxt_solutions":"Security, Compliance & Governance, Elastic Engineering for Security, Security Operations, Security Strategy","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"Per-site WAF policy IP address restriction rules Pt.1 | Rackspace","field_topics":"","field_slug":"configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-one","footnotes":""},"categories":[178],"tags":[204],"class_list":["post-7206","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/7206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/comments?post=7206"}],"version-history":[{"count":2,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/7206\/revisions"}],"predecessor-version":[{"id":9145,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/blogs\/7206\/revisions\/9145"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/media\/7208"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/media?parent=7206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/categories?post=7206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/en-gb\/wp-json\/wp\/v2\/tags?post=7206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}