Forum Discussion
Jonathan_Robins
Nimbostratus
Aug 26, 2010GTM iRule to block certain IPs DNS Query of a WideIP
Hello
I need to stop a GTM Wide IP from responding to client IPs unless they are in a whitelist.
Ideally the GTM would respond with an NSDOMAIN rather than drop the request.
I am...
Jonathan_Robins
Nimbostratus
Aug 27, 2010Thanks for the reply Bhattman, I now get the following error:
01070151:3: Rule [GAM_block_non_intranet_dns_query] error: line 1: [undefined procedure: matchclass] [matchclass [IP::remote_addr] eq $::ip_allowed_datagroup]
So I assume that the matchclass can not be used within a when DNS_REQUEST?
I have managed to get it working using multiple if statements using ip::addr to test against all my internal subnets (I'm trying to prevent a reply to an IP unless it is from my inside networks)..
if {![IP::addr [IP::remote_addr] equals 10.0.0.0/8]}{
if {![IP::addr [IP::remote_addr] equals 172.29.0.0/16]}{
if {![IP::addr [IP::remote_addr] equals 172.30.0.0/16]}{
drop
}
}
}
There must be a more elegant / efficient way of doing this?
Also rather than drop I want to send an NXDOMAIN is this possible?
--Jonathan
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects