Forum Discussion

ZhenDong_117274's avatar
ZhenDong_117274
Icon for Nimbostratus rankNimbostratus
Dec 04, 2013

How to use Irules deny someone access some website

when HTTP_REQUEST { if { {matchclass [IP::remote_addr] not equals $::vip} && {HTTP::uri contains $::website}}{ HTTP::redirect http://www.google.com

 

} }

 

V9.4.8 The website is String Type Date Group .example : youtube.com The vip is address Type Date Group. example:192.168.2.2 I have a Virtual Server 0.0.0.0:80 Type is Standard and load is irule,Then I can not access any website:80. What should I to do for this.

 

1 Reply

  • Try this;

    when HTTP_REQUEST { 
        if { [matchclass [IP::remote_addr] eq dg_ip_whitelist] && [matchclass [HTTP::host] eq dg_website_whitelist]} {
            HTTP::redirect http://www.google.com 
        } 
    }