<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Block domains in register form - WAF (Web Application Firewall)				            </title>
            <link>https://www.skudonet.com/community/community-edition-waf-forum/block-domains-in-register-form/</link>
            <description>SKUDONET Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Mon, 13 Jul 2026 01:02:01 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Block domains in register form</title>
                        <link>https://www.skudonet.com/community/community-edition-waf-forum/block-domains-in-register-form/#post-9</link>
                        <pubDate>Sat, 30 Nov 2024 11:42:25 +0000</pubDate>
                        <description><![CDATA[Good day, I assume, your webpage is using a form with two fields, email and  password , commonly this form information is sent by POST, so:
 
Create a simple file in the SKUDONET Open Sour...]]></description>
                        <content:encoded><![CDATA[<p>Good day, I assume, your webpage is using a form with two fields, <strong>email</strong> and  <strong>password</strong> , commonly this form information is sent by POST, so:</p>
<p> </p>
<p>Create a simple file in the SKUDONET Open Source Load Balancer web  GUI, lateral menu, IPDS &gt; WAF &gt; Files, with some descriptive name,  in my test I have used this file:</p>
<p>https://github.com/MattKetmo/EmailChecker/blob/master/res/throwaway_domains.txt</p>
<p>Copy the content and create a Data file with the name throwaway_domains, by default a file with the name throwaway_domains.data is generated in the path /usr/local/skudonet/config/ipds/waf/sets/</p>
<p>-Now create a WAF file with type "Ruleset" in lateral menu, IPDS &gt; WAF &gt; Files, with a descriptive name <strong><span class="ng-star-inserted">reject-bad-email-domains</span></strong> and the following content:</p>
<p> </p>
<pre contenteditable="false">SecRuleEngine on
SecDefaultAction "pass,log,auditlog,logdata:'client:%{REMOTE_ADDR}',phase:1"
SecDefaultAction "pass,log,auditlog,logdata:'client:%{REMOTE_ADDR}',phase:2"
SecDefaultAction "pass,log,auditlog,logdata:'client:%{REMOTE_ADDR}',phase:3"
SecDefaultAction "pass,log,auditlog,logdata:'client:%{REMOTE_ADDR}',phase:4"


SecRule ARGS.email "@pmFromFile throwaway_domains.data" \
    "id:99200000,\
    phase:2,\
    deny,\
    t:none,t:cmdLine,\
    msg:'SKUDONET Bad domains in form',\
    logdata:'Received Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',\
    ver:'skd-v1.0'" #

</pre>
<p>The rule is described below:</p>
<p>SKUDONET WAF will check the POST field in phase2 (Request Body) with the name <strong>email</strong> inside the content of the file throwaway_domains.data, if there is a match then a deny will be replied adding information to the syslog /var/log/syslog.</p>
<p><strong>id:</strong> select a  number between 99,200,000-99,209,999, this range is reserved for SKUDONET by Modsecurity. </p>
<p><strong>ARGS.email:</strong> it is the field name in the form where is sent the email we want to protect.</p>
<p>t<strong>hrowaway_domains.data:</strong> is the file where the not allowed domains are saved.</p>
<p><strong>deny:</strong> the default action if the rule is triggered.</p>
<p>Save the rule, a new rule with the name <strong><span class="ng-star-inserted">reject-bad-email-domains</span></strong> will be shown in IPDS &gt; WAF &gt; Rulesets. select the rule and apply an Start action, go to the farm that you want to protect, Tab IPDS, search this new rule and apply this rule to the farm to start protecting.</p>
<p> </p>
<p>Check the rule with the following curl: </p>
<pre contenteditable="false">curl https://FARM_IP/ -k -X POST --form 'email=user@30wave.com'

SKUDONET WAF replied forbidden</pre>
<p>if the rule is triggered, the SKUDONET logs in /var/log/syslog show something like this:</p>
<pre contenteditable="false">2024-11-30T12:30:39.300144+01:00 skdce701 pound: proxy,  (7f3bf5fbe6c0)  SKUDONET ModSecurity: Access denied with code 403 (phase 2). Matched "Operator `PmFromFile' with parameter `throwaway_domains.data' against variable `ARGS:email' (Value: `user@30wave.com' )              
2024-11-30T12:30:39.301323+01:00 skdce701 pound: proxy, service local, backend 192.168.1.145:443, (7f3bf5fbe6c0) WAF denied a request from 192.168.1.145</pre>
<p> </p>
<p>Any change in the  <strong>throwaway_domains.data</strong> requires a restart of the rule but this restart doesn't affect to production. </p>
<p> </p>]]></content:encoded>
						                            <category domain="https://www.skudonet.com/community/community-edition-waf-forum/">WAF (Web Application Firewall)</category>                        <dc:creator>emiliocm</dc:creator>
                        <guid isPermaLink="true">https://www.skudonet.com/community/community-edition-waf-forum/block-domains-in-register-form/#post-9</guid>
                    </item>
				                    <item>
                        <title>Block domains in register form</title>
                        <link>https://www.skudonet.com/community/community-edition-waf-forum/block-domains-in-register-form/#post-8</link>
                        <pubDate>Sat, 30 Nov 2024 10:06:41 +0000</pubDate>
                        <description><![CDATA[How can the SKUDONET WAF can be configured to block not allowed domain emails? We have a registration form in our websites and we don&#039;t want to allow Outlook, Gmail and other domains]]></description>
                        <content:encoded><![CDATA[<p>How can the SKUDONET WAF can be configured to block not allowed domain emails? We have a registration form in our websites and we don't want to allow Outlook, Gmail and other domains</p>]]></content:encoded>
						                            <category domain="https://www.skudonet.com/community/community-edition-waf-forum/">WAF (Web Application Firewall)</category>                        <dc:creator>emiliocm</dc:creator>
                        <guid isPermaLink="true">https://www.skudonet.com/community/community-edition-waf-forum/block-domains-in-register-form/#post-8</guid>
                    </item>
							        </channel>
        </rss>
		