Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Wildcard domain in packet filter?

Is there a way to specify a wildcard when defining networks by domain name?

I am trying to setup a packet filter rule to block all traffic to/from all hosts in a particular domain.  I've tried using the "DNS group" option but it does not seem to accept wildcards.

For example, I want to block all traffic from *.baddomain.com

I've created a DNS group entry for "baddomain.com" (without the quotes), and it will resolve one IP address, but it does not appear to resolve any of the subdomains.  If I enter "*.baddomain.com" it says it's unresolved.

I'm only using packet filter rules; no proxies.

The contextual help does not specify, and I've had no luck searching the forums, so if this is answered elsewhere, I apologize!

We're running 7.502.

Thanks!


This thread was automatically locked due to age.
  • Unfortunately the dns group doesn't include subdomain. Just curious what you are trying to block. If it is http request, you will have a lot more control with http proxy where you can allow all other traffic non proxied and only deny "baddomain"
  • We are only using Astaro as a first-level packet filter, and not doing any advanced filtering/proxies/blocking/inspection.  We have seen some strange traffic from some Russian and Chinese hosts, and they have MANY subdomains, all of which we feel are potential threats.  We want to simply drop the traffic without inspection of the contents.

    We only have the packet filter enabled; nothing else!

    Thanks!
  • So is there a way it can be done?  DNS group seemed the most likely, but it seems like this might be a useful feature?  We want to block ALL traffic to/from these domains, not just certain ports.

    Thanks!
  • Like Billybob said, there's no subdomain functionality in Network Definitions.  The DNS Group is for FQDNs like pool.ntp.org that resolve to multiple IPs.  I usually use CentralOps Domain Dossier to see whether to create a DNS Group or several Host/Network definitions and a Network Group.

    Cheers - Bob
  • Ok, thanks.  I guess we'll just block the individual domains that we see as they occur, adding them to the blocked group.

    This would be a nice feature to include in future versions.  With DNS groups, they are already 95% there.

    Thanks again!
  • I don't know how that could be done.  I don't think name servers have an option for a query like, "Send me all of the IPs of all FQDNs you have related to this domain."  For example, if you look up the DNS records for ntp.org, you won't see pool.ntp.org listed.

    Cheers - Bob
  • Bob,

    Yes, I agree that DNS doesn't work that way.  However, it would be nice if the packet filter, when presented with abc.baddomain.com, and *.baddomain.com was blacklisted, would just drop the packet.  The first time it hit there would be a small delay for the reverse lookup, but after that it could just keep the IP associated with the FQDN.

    Thanks!
  • Hi, if foo.baddomain.com and bar.baddomain.com are both in the same network, then just create a definition for the network.

    Barry
  • Excellent idea, TXMRS!

    That belongs in Astaro Gateway Feature Requests.

    Cheers - Bob
  • Is there a DNS plugin for IPTables?

    Barry