
{"id":7209,"date":"2021-02-21T12:07:52","date_gmt":"2021-02-21T12:07:52","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-two\/"},"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-two","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/de\/blogs\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-two\/","title":{"rendered":"Configuring a per-site WAF policy with IP address restriction rules: Part two"},"content":{"rendered":"<p>In <a href=\"https:\/\/docs.rackspace.com\/blog\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-one\/\">Part one<\/a>&nbsp;of this three-part series, I introduced the concept of the per-site web application firewall (WAF) Policy with IP address rule restrictions and set the stage for this demonstration. Part one also lays out the assumptions for the implementation walkthrough. In this post, I present the Application Gateway configuration.<\/p>\n<p><strong>Application Gateway configuration<\/strong><\/p>\n<p>My Application Gateway is already provisioned, so let me share the relevant settings that I configured.<\/p>\n<p><strong>Web Application Firewall&nbsp;<\/strong><\/p>\n<p>1. Under the Configure tab, I have WAF V2 as the selected Tier, Firewall Status enabled&nbsp;and in Prevention mode. I did not create any exclusions and I left the Global parameters with the default settings.&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26309-body-Picture2_31.png\" alt=\"waf pic 2\" \/><\/p>\n<p>\n2. On the Rules tab, I left the default ruleset of OWASP 3.0 and Advanced rule configuration disabled.<\/p>\n<p><strong>Backend Pool<\/strong><br \/>\nI have my Windows VM (or rather it\u2019s NIC) added as a backend target to a pool I created called <em>vmPool01<\/em>.<\/p>\n<p>&#8211; <strong>Backend protocol\/port<\/strong>: Because this is purely for testing, I selected <em>HTTP\/80<\/em>.<br \/>\n&#8211; <strong>Cookie-based affinity<\/strong>: <em>disabled<\/em><br \/>\n&#8211; Connection draining: <em>disabled<\/em><br \/>\n&#8211; <strong>Request time-out (seconds) <\/strong>: Default of <em>20<\/em><br \/>\n&#8211; <strong>Override with new hostname<\/strong>: <em>yes<\/em><br \/>\n&#8211; <strong>Override with specific domain name<\/strong>: Selected. Because I have two websites running on<br \/>\n&nbsp; the same VM, I need to select this option and specify the website URL so that the system<br \/>\n&nbsp; forwards requests to the correct site based on the incoming host header.<br \/>\n&nbsp; &nbsp;&#8211; For <strong>HTTPSettings01<\/strong>, I specified <em>site1.hiteshvadgama.co.uk<\/em>&nbsp;as the domain name<br \/>\n&nbsp; &nbsp;&#8211; For <strong>HTTPSettings02<\/strong>, I specified <em>site2.hiteshvadgama.co.uk <\/em>as the domain name<br \/>\n&#8211; <strong>Custom Probe<\/strong>: I created a custom probe for each website and assigned each to the<br \/>\n&nbsp; respective HTTP Setting object for health monitoring purposes.<\/p>\n<p>The following screenshot shows the <strong>HttpSettings01<\/strong> object for reference:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26309-body-Picture5_24.png\" alt=\"waf pic 5\" \/><\/p>\n<p><strong>&nbsp;Frontend IP configurations&nbsp;<\/strong><\/p>\n<p>The Application Gateway has a public IP address that I used to create DNS A records to map my two websites.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26309-body-Picture6_17.png\" alt=\"waf pic 6\" \/><\/p>\n<p><strong>Listeners<\/strong><\/p>\n<p>1. I created a Listener for each website. The custom WAF rule needs this to work because I associate the rule to a specific Listener later so it impacts only one website.<\/p>\n<p>&#8211; <strong>Site1_Listener<\/strong>: corresponding to <strong>site1.hiteshvadgama.co.uk<\/strong><br \/>\n&#8211; <strong>Site2_Listener<\/strong>: corresponding to <strong>site2.hiteshvadgama.co.uk<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26309-body-Picture7_16.png\" alt=\"waf pic 7\" \/><\/p>\n<p>2. In the configuration for each Listener, I have the following:&nbsp;<\/p>\n<p>&#8211; <strong>Frontend IP<\/strong>: <em>public<\/em><br \/>\n&#8211; <strong>Port<\/strong>: <em>80<\/em><br \/>\n&#8211; <strong>Associated Rule<\/strong>: I created a routing rule for each website and associated it to the<br \/>\n&nbsp; respective Listener. I cover routing rules in the next section.<br \/>\n&#8211; <strong>Listener Type<\/strong>: Because I have more than one hosted site, I selected <em>Multi site<\/em>.<br \/>\n&#8211; <strong>Host name<\/strong>: I entered the URL corresponding to the respective website.<\/p>\n<p>Following is a screenshot of the <strong>Site1_Listener<\/strong>&nbsp;for reference:<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26309-body-Picture8_15.png\" alt=\"waf pic 8\" \/><\/p>\n<p><strong>Rules&nbsp;<\/strong><\/p>\n<p>1. I created a routing rule for each Listener:<\/p>\n<p>&#8211; Site1_Rule: corresponding to <em>Site1_Listener<\/em><br \/>\n&#8211; Site2_Rule: corresponding to <em>Site2_Listener<\/em><\/p>\n<p>2. For <strong>Site1_Rule<\/strong>&nbsp;backend targets, I have a <strong>backend pool<\/strong>&nbsp;(<em>vmPool01<\/em>) and the&nbsp;<strong>HTTPSettings01&nbsp;<\/strong>object.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26309-body-Picture9_14.png\" alt=\"waf pic 9\" \/><\/p>\n<p>3. For <strong>Site2_Rule<\/strong>&nbsp;backend targets, I again have <strong>backend pool<\/strong>&nbsp;(<em>vmPool01<\/em>) but this<br \/>\n&nbsp; &nbsp;time with the <strong>HTTPSettings02&nbsp;<\/strong>object.&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26309-body-Picture10_13.png\" alt=\"waf pic 10\" \/><\/p>\n<p>\n<a href=\"https:\/\/docs.rackspace.com\/blog\/configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-three\">Post 3<\/a>&nbsp;concludes the series with WAF policy configuration and testing the custom rule.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configuring a per-site WAF policy with IP address restriction rules: Part two<\/p>\n","protected":false},"author":2,"featured_media":7211,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26309","content_type":"blog","created_by":"10130","authored_on":"2023-11-29T12:07:52+00:00","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"by Hitesh Vadgama, Solutions Architect, Rackspace Technology","seo_description":"Focus on Application Gateway configuration for the per-site WAF policy with IP address restriction rules. Read part 2.\r\n","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_technical_images\/26309-insights_image-security-technical-blog-1-insights.jpg","field_partners":"","rxt_platforms":"Microsoft Azure, Security, Cloud-Native Security, Multicloud Security, On-Premises Security","product":"","publisheddate":"2021-02-21T12:07:52","rxt_solutions":"Security, Elastic Engineering for Security, Security Operations","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"Per-site WAF policy IP address restriction rules Pt.2 | Rackspace","field_topics":"","field_slug":"configuring-a-per-site-waf-policy-with-ip-address-restriction-rules-part-two","footnotes":""},"categories":[178],"tags":[204],"class_list":["post-7209","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/7209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/comments?post=7209"}],"version-history":[{"count":2,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/7209\/revisions"}],"predecessor-version":[{"id":9153,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/7209\/revisions\/9153"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/media\/7211"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/media?parent=7209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/categories?post=7209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/tags?post=7209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}