Quote:
Originally posted here by frpeter
This fact that its application has added to the stability of BullDog vs for example, tcpdump's realtime resolution. Tcpdump would stop and wait for the dns to answer. Even though it has a 10 second time out, that could easily result in lost packets or delaying packet processing. My goal in the processors is to evaluate the packets as fast as possible. That may mean humdreds or thousands of packets a second being processed. Realtime resolution simply is not practical. Even if its a cacheing nameserver. Realtime resolution would slow processing down to much to be a viable solution under an attack.
I was not suggesting that a "realtime" "resolve on every IP" kind of approach, I simply asked why not simply farm off the DNS caching implementation to services that are already written for it? It seems like unneeded bloat in BullDog, and would be much better left to services that actually do the resolution. If you had a caching-only nameserver on your BullDog box, lookups would be almost equally fast, but it would guarantee that you're adhering to the DNS standard.
Quote:
I confirmed that I had IPTables configured properly with the netfilter team. The issue was the vulnerability in bind and the attacker clearly knew how to exploit it.
I'm confused, how did BullDog save you but Netfilter didn't, even though both were properly configured?
Quote:
Originally posted here by frpeter
Proxy servers only guard in a limited context and not everyu service has a proxy server.
They filter out traffic, and they do it on content and domain restrictions.
Quote:
Bind is a good example of an unproxied service that must (for the most part) remain open when hosting domains. Its far more effecient to block a domain name base organization with name rather the several rules required where the IP addresses may cover several unrelated IP blocks.
I'm not sure why. What circumstances have arisen that have prompted you to start blocking access to your DNS based on domain names?
[QUOTE] Originally posted here by frpeter
[B]Here are some hard numbers to support the usage of the DNS Database. I used tcpdump to get these. Packet display omited. The test was run with a count of 1000 packets.
This first run is with inline (realtime) IP resolving.
Quote:
$ time tcpdump -q -c 1000
15134 packets received by filter
11922 packets dropped by kernel
real 1m3.847s
user 0m0.050s
sys 0m0.030s
Must be a busy box for the kernel to pick up and look at over 25 times the number of packets you told it to. Is there any way you could confirm the kernel was droping legitimate packets (as in destined for the host running TCPDump) there?
There are two likely scenarios on the dropped packets front:
TCPDump sets the NIC into promiscuous mode, and I know the kernel will drop packets that are not destined for it -- perfectly normal behaviour. That large number of dropped packets may be coming across a hub to other computers on the rest of your network, depending on how you have it setup.
It could also be packet timeouts occurring while sitting in the queue because of how TCPDump handles its lookups (basically pauses the packet queue while doing the reverse lookup). Simply because one app is done that way, it doesn't mean a realtime system couldn't be done more efficiently.
On my firewall here at home (not as busy obviously):
Code:
$ time tcpdump -q -c 1000 > /dev/null
tcpdump: listening on eth0
1032 packets received by filter
2 packets dropped by kernel
real 1m5.209s
user 0m0.017s
sys 0m0.025s
Some of that was the time it took to generate the traffic as I'm the only one currently using our 'net access. :)
Quote:
The second run is without inline (realtime) resolving. This is how BullDog currently runs, relying on IP resolution from the internal DNS database. IP resolution is handled by 12 (default setting) of its children seperately from the collector and processors.
$ time tcpdump -q -n -c 1000
1000 packets received by filter
0 packets dropped by kernel
real 0m5.434s
user 0m0.000s
sys 0m0.010s
Again on my system:
Code:
$ time tcpdump -q -n -c 1000 > /dev/null
tcpdump: listening on eth0
1001 packets received by filter
0 packets dropped by kernel
real 0m32.997s
user 0m0.018s
sys 0m0.010s
Quote:
You'll notice immediately that the time for realtime resolution is an unreasonable 1m+ vs 5s for the DNS database usage. Also notice the NO packets where lost when not resolving realtime. If the test where to be repeated for 10,000 packets, the difference would be unsufferable and intolerable. IMHO, the space for the DNS database is more then justified by the performance gain it yeilds.
All you've really shown here is that the manner in which TCPDump does "realtime resolution" is flawed. I fail to see how this means a caching nameserver couldn't do the job just as well while adhering to DNS spec.
What's ironic is that of all the things you are talking about BullDog doing, you and others seem to be focused on the DNS side of things. If that's really the primary advantage, then simply use NF and be done with it. You can do domain based rules inside NF; when it sees a rule with a destination of say "www.google.com" it will look up the IP addresses for that name, and apply the rules:
Yes, that creates a huge table if you are blocking gigantic domains, however it is probably a lot faster for NF to handle the large table than keep a huge DNS database file on a drive and search through it for every packet.