OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« previous next »
  • Print
Pages: [1]

Author Topic: Allow Wildcard Firewall Rules - Windows Updates + Anydesk  (Read 9557 times)

dietzelmann

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« on: October 21, 2019, 08:55:46 pm »
Hey guys,

I'm currently using Sophos UTM and I want to migrate my firewalls to OPNsense. Since OPNsense is advertising
Quote
HIGH-END SECURITY MADE EASY
I'd have never thought that easy peasy tasks on Sophos UTM need expert knowledge on OPNsense.

I've read a few threads where people struggeld with allowing wildcard domains in OPNsense. And I can confirm it's definitely a pain in the ass. I'm already trying it since a few days to make Windows Updates and AnyDesk work.

Todo -> allow these Domains::
  • *.net.anydesk.com [TCP] 80,443,6568
  • *.update.microsoft.com [TCP] 80,443
  • *.update.microsoft.com [TCP] 80,443
  • download.windowsupdate.com [TCP] 80,443

With Sophos UTM this is an easy job since Windows Updates are proconfigured as a service.

All other * wildcards can be handled with a regex like this:
Code: [Select]
^https?://([A-Za-z0-9.-]*\.)?windowsupdate\.com/
Has somebody  ever made Windows Updates and Anydesk work with OPNsense?




sources:
  • https://support.anydesk.com/Firewall
  • https://answers.microsoft.com/en-us/windows/forum/all/how-to-add-outbound-rule-in-windows-firewall-to/7f9c04c1-5216-47d9-9de3-64cc19eb796d
« Last Edit: October 21, 2019, 08:57:19 pm by dietzelmann »
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« Reply #1 on: October 22, 2019, 05:37:00 am »
Arent whitelists in proxy capable doing regex?
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

dietzelmann

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« Reply #2 on: October 22, 2019, 08:40:26 am »
Quote from: mimugmail on October 22, 2019, 05:37:00 am
Arent whitelists in proxy capable doing regex?

Maybe but I haven't found a working solution in any site (stackoverflow or here). At least my regex which works fine on Sophos UTM isn't working with OPNsense.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« Reply #3 on: October 22, 2019, 09:18:40 am »
Screenshot please
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

hbc

  • Hero Member
  • *****
  • Posts: 501
  • Karma: 47
    • View Profile
Re: Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« Reply #4 on: October 22, 2019, 11:22:32 am »
Quote from: dietzelmann on October 22, 2019, 08:40:26 am
Quote from: mimugmail on October 22, 2019, 05:37:00 am
Arent whitelists in proxy capable doing regex?

Maybe but I haven't found a working solution in any site (stackoverflow or here). At least my regex which works fine on Sophos UTM isn't working with OPNsense.

You have to take care with regex, since OPNsense escapes some(?) - at least one - important regex expression itself. Maybe good for users with less requirements and simple regex, but bad for powerusers.

E.g. the important impressions (.*) or (.+) are escaped to (\.*) and (\.+).

So I guess your regex
Code: [Select]
^https?://([A-Za-z0-9.-]*\.)?windowsupdate\.com/is transcoded to:
Code: [Select]
^https?://([A-Za-z0-9\.-]*\.)?windowsupdate\.com/
The dot is autoescaped by OPNsense. I would recommend the devs not to change and escape regex in proxy configuration when saving config, because it may change the match.

Since running anyway a patch over my processed squid.conf, I fix these regex in this step.
Logged
Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz (24 cores)
256 GB RAM, 300GB RAID1, 3x4 10G Chelsio T540-CO-SR

chemlud

  • Hero Member
  • *****
  • Posts: 2488
  • Karma: 112
    • View Profile
Re: Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« Reply #5 on: October 22, 2019, 04:08:36 pm »
May I ask: How does it work with sophos? Are the IP's to your wildcard domains resolved and access is allowed based on this list of IPs? What happens if MS telemetry or what ever is in the same IP range?

Or does the sophos block DNS requests for anything other than your whitelisted domains?


Logged
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« Reply #6 on: October 22, 2019, 06:34:48 pm »
Via Sophos with Proxy
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

dietzelmann

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« Reply #7 on: October 24, 2019, 08:56:39 pm »
I made it work by allowing all Microsoft IPs based on this csv: https://www.microsoft.com/en-us/download/details.aspx?id=53602

One problem solved - new problem created by activating web proxy / filter.

I have exact the same problem now as it is written here: https://forum.opnsense.org/index.php?topic=6648.0 but since May 2018 no solution.
Logged

opnsenseuser

  • Sr. Member
  • ****
  • Posts: 437
  • Karma: 70
    • View Profile
Re: Allow Wildcard Firewall Rules - Windows Updates + Anydesk
« Reply #8 on: October 25, 2019, 09:31:46 am »
Quote from: dietzelmann on October 21, 2019, 08:55:46 pm
Hey guys,

I'm currently using Sophos UTM and I want to migrate my firewalls to OPNsense. Since OPNsense is advertising
Quote
HIGH-END SECURITY MADE EASY
I'd have never thought that easy peasy tasks on Sophos UTM need expert knowledge on OPNsense.

I've read a few threads where people struggeld with allowing wildcard domains in OPNsense. And I can confirm it's definitely a pain in the ass. I'm already trying it since a few days to make Windows Updates and AnyDesk work.

Todo -> allow these Domains::
  • *.net.anydesk.com [TCP] 80,443,6568
  • *.update.microsoft.com [TCP] 80,443
  • *.update.microsoft.com [TCP] 80,443
  • download.windowsupdate.com [TCP] 80,443

With Sophos UTM this is an easy job since Windows Updates are proconfigured as a service.

All other * wildcards can be handled with a regex like this:
Code: [Select]
^https?://([A-Za-z0-9.-]*\.)?windowsupdate\.com/
Has somebody  ever made Windows Updates and Anydesk work with OPNsense?




sources:
  • https://support.anydesk.com/Firewall
  • https://answers.microsoft.com/en-us/windows/forum/all/how-to-add-outbound-rule-in-windows-firewall-to/7f9c04c1-5216-47d9-9de3-64cc19eb796d

with pfsense there is a solution. (german board)
https://forum.netgate.com/topic/119256/squid-ssl-filtering-liefert-windows-10-update-fehler-0x801901f7

with opnsense no 100% solution
https://forum.opnsense.org/index.php?topic=6648.0

Logged
Supermicro A2SDi-4C-HLN4F
Team Rebellion Member (sidebar / themes: tukan, cicada & vicuna)

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Allow Wildcard Firewall Rules - Windows Updates + Anydesk
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2