Blocking by hostname

I am seeing if the Comodo Firewall can work with the ThreatSTOP ( service. What we do is propagate lists of IP addresses that are known to attack other servers/users using DNS, like the DShield Top 10 ( list.

I can configure a rule with a hostname that returns 20 distinct IP addresses, and it looks like it gets all the IP addresses correctly. When I look at the details of the rule, the hostname in the rule shows “NAME: [basic.threatstop.local] - - …” With this enabled, all traffic between those 2 addresses is blocked.

Is it supposed to work like this? We don’t want to block that full range, but the individual IP addresses.

Thank You

David Daugherty

Welcome to the House of Comodo Forums, David (:WAV)

If that Hostname is associated with the full range of IP addresses, then yes, that is how it works.

For example, if I create a Network rule regarding Hostname:, this automatically invokes the entire range registered to that host, of -; it will be either blocked or allowed depending on my rule structure. It does not, nor cannot, select individual ranges from within that Host’s IP range.

In order to do that, I would need to create Single IP rules, or Range rules, rather than for the entire Host.

As I understand it from your website, you are attempting to integrate a “badlist” into the firewall for IP blocking, correct? Can you explain a little more about how it works on your end; how the file is generated, downloaded, etc? Maybe there’s a way we can work around…


Do I understand this correctly ?
By entering a host-name in a block-host rule I can block ALL IP-ranges assigned to that host-name ?
If I was to make a block-rule for, as an example, “DoD Network Information Center”
(or rather a site with a host-name and within their assigned ranges since there is no '" site )
would that block ALL IP-ranges assigned to them ? ( and that’s A LOT )?

Correct. For instance, if you didn’t want the evil Google Empire to spy on you (assuming they do, of course, just to use a real-world example :wink: ) you build a Network Monitor rule to Block IP In/Out, Source Hostname, Destination Hostname, IP Details Any. Probably want it at the top of NetMon (Rule ID 0) so that your browser wouldn’t be allowed to make an outbound connection to their sites. This would block -


LM, yes, basically we are supplying a list of IP addresses through DNS that the user can use to block with their firewall, or allow if they want. What they do with the list is up to them. A rather unusual way to use DNS, but it works pretty good in most cases. Most of our lists are pretty big and have to be split up due to BIND limitations and TCP packet size limits.

Basically what we do is grab a source block list, is what we use to get the DShield Top 10 list. We take that file, extract the IP addresses and add them to a file for our DNS server to load into a zone. A DNS query to one of our lists would return a list of IP addresses. Right now we are only using DNS to supply the list, other options may be used in the future.

C:>nslookup basic.threatstop.local
Server: dns-server

Name: basic.threatstop.local

A rule for iptables would look something like this:
iptables -A threatstop -s basic.threatstop.local -j DROP

This would actually create a separate rule for each IP address in the hostname. Some firewalls would actually work directly off the hostname, Netscreens for example, and keep the DNS query in it’s local cache until it expires. Other firewalls have to use a script to configure it, like iptables and PF since they create rules for each address and don’t know or care about the TTL for the hostname. We have to flush the chain and reload it every couple hours. Some firewalls will not work, like the one that comes with WinXP since you can only build rules using IP addresses.


Clever! Great lateral use of DNS!

Okay, so in this situation the hostname is defined by a group of IP addresses; that would seem to perhaps give us something to work with.

I am presently using CFP v3 Beta, so I tested with that. Placed this rule at the top of the Network Monitor:
Action: Block
Protocol: IP
Direction: Out
Source IP: Any
Destination IP: Hostname: basic.threatstop.local
IP Details: Any

I selected several IP’s from your post, and loaded them into the browser for outbound connection. No connection was able to complete on any of them.

My thought was that if the hostname was made up of a group of IP addresses, then the DNS lookup should be able to sort that out the same way it would with any hostname - IP address relationship.