cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Blocking Internationalized Domain Names

Jump to solution

I'm trying to figure out how to block domains and domain suffixes which are using an internationalized domain name. The names begin with ascii xn-- and continue from there. An example site would be: xn--rksmrgs-5wao1o.josefsson.org.

I've tried wildcard/regex matching for "*xn--*" being in domain but that doesn't seem to work and ruletracing is showing the site hitting as: http://r%C3%A4ksm%C3%B6rg%C3%A5s.josefsson.org/ when web gateway sees it. I've also tried blocking "*%*" in the domain name but also no success. Any idea on how I should go about this?

Goal: Block sites using IDNs within domain or domain suffix.

1 Solution

Accepted Solutions
Highlighted

Re: Blocking Internationalized Domain Names

Jump to solution

My own solution which is working well so far:

url.Raw does NOT match regex(^(?:https?:\/\/)*+(?:(?!xn--).)+?(?:\/.*)?$)

*edit, removed |% from the negative lookahead group

View solution in original post

2 Replies
Highlighted

Re: Blocking Internationalized Domain Names

Jump to solution

My own solution which is working well so far:

url.Raw does NOT match regex(^(?:https?:\/\/)*+(?:(?!xn--).)+?(?:\/.*)?$)

*edit, removed |% from the negative lookahead group

View solution in original post

Highlighted
Level 12
Report Inappropriate Content
Message 3 of 3

Re: Blocking Internationalized Domain Names

Jump to solution

Thanks for this tidbit.  Is it working well still?  For the regex-impaired, can you specify what the regex is doing and more importantly what action you're taking in the policy if that does not match is true?  Block?  Warning page?  

Also, sadly, the new support community framework has made a dog's breakfast of the regex I'm afraid.  Repasting: 

url.Raw does NOT match regex(^(?:https?:\/\/)*+(?:(?!xn--).)+?(?:\/.*)?$)

or adding a __DELETEME__ to keep from auto-frown emoji to occur

url.Raw does NOT match regex(^(?:https?:\/\/)*+(?:__DELETEME__(?!xn--).)+?(?:\/.*)?$)

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community