Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

At what directory can I add CSS and Image files for the ASM's custom blocking page?

Wasfi_Bounni
Cirrostratus
Cirrostratus

Hi;

 

I am trying to add a custom blocking page instead of the default one. However, I wanted to know that in case I wanted to host the CSS and Image files locally, at what directory should I place them and how do I need to reference them in the HTML code of this "custom blocking page".

 

 

Kindly

Wasfi

1 ACCEPTED SOLUTION

Daniel_Wolf
Nacreous
Nacreous

Hi Wasfi,

 

there are a couple of ways to include CSS and images in your blocking response pages.

 

F5 recommends that you host required assets for the blocking response page outside the BIG-IP environment serving it or you serve the blocking response page assets from a local sorry server and have the BIG-IP ASM system redirect violating clients with the proper support ID. For example, you can place assets on Content Delivery Network(CDN) /"sorry server".

See K13050156: BIG-IP ASM operations guide | Chapter 4: Policy tuning and enhancement

I would recommend that too.

 

As an alternative you could also try placing assets like CSS stylesheets inline to the HTML markup.

Beware that the response page size limit is 51200 bytes since BIG-IP 11.0.0.

So no big HD pictures...

See Archived - K10955: BIG-IP ASM blocking page is limited to 9500 bytes

 

Another solution could be using ifiles.

Manual Chapter : Referencing an External File from within an iRule

In this thread "iRule to modify response code for ASM blocking page"  is sharing some sample iRule code how to use iFiles in blocking pages.

However, pay attention that in this example he is setting HTTP status 500 as response code, since it was part of the requesters requirement. I would recommend to stick with HTTP status 200.

 

KR

Daniel

 

View solution in original post

1 REPLY 1

Daniel_Wolf
Nacreous
Nacreous

Hi Wasfi,

 

there are a couple of ways to include CSS and images in your blocking response pages.

 

F5 recommends that you host required assets for the blocking response page outside the BIG-IP environment serving it or you serve the blocking response page assets from a local sorry server and have the BIG-IP ASM system redirect violating clients with the proper support ID. For example, you can place assets on Content Delivery Network(CDN) /"sorry server".

See K13050156: BIG-IP ASM operations guide | Chapter 4: Policy tuning and enhancement

I would recommend that too.

 

As an alternative you could also try placing assets like CSS stylesheets inline to the HTML markup.

Beware that the response page size limit is 51200 bytes since BIG-IP 11.0.0.

So no big HD pictures...

See Archived - K10955: BIG-IP ASM blocking page is limited to 9500 bytes

 

Another solution could be using ifiles.

Manual Chapter : Referencing an External File from within an iRule

In this thread "iRule to modify response code for ASM blocking page"  is sharing some sample iRule code how to use iFiles in blocking pages.

However, pay attention that in this example he is setting HTTP status 500 as response code, since it was part of the requesters requirement. I would recommend to stick with HTTP status 200.

 

KR

Daniel