2.1.1.2. Lab 2 - Log and Change HeadersΒΆ

Your iRule should:

  1. Log all HTTP request headers.
  2. Log all HTTP response headers.
  3. Remove the header named Server from all HTTP responses.

Attention

OPTIONAL: Instead of removing the Server header in the response, change the value of the Server header to Microsoft-IIS/7.0.

Important

  • Estimated completion time: 15 minutes
  1. Open Chrome Browser

  2. Enter https://bigip1 into the address bar and hit Enter

    ../../_images/bigip_login.png
  3. Login with username: admin

    password: admin.F5demo.com

  4. Click Local Traffic -> iRules -> iRules List

  5. Click Create button

    ../../_images/irule_create.png
  6. Enter Name of Header_Log_Strip_iRule

  7. Enter Your Code

  8. Click Finished

  9. Click Local Traffic -> Virtual Servers -> Virtual Server List

  10. Click on http_irules_vip

    ../../_images/select_vs.png
  11. Click on the Resources tab

  12. Click Manage button for the iRules section

    ../../_images/resources.png
  13. Click on Header_Log_Strip_iRule from the Available box and click the << button, thus moving it to the Enabled box, your first and now second iRule should be in the Enabled box.

    ../../_images/lab2-irules-add.png
  14. Click the Finished button

  15. Open the Firefox browser

  16. Click the 3 horizontal line button on the far right of the address bar

  17. Use developer tools in Mozilla, or use Chrome to view headers

    ../../_images/firefox_developer.png
  18. Enter http://dvwa.f5lab.com/ and ensure you get there

  19. Now enter http://wackopicko.f5lab.com/

  20. Finally, enter http://peruggia.f5lab.com/ and ensure you can get to that app

  21. Look at the headers for each of your requests. Did you log them all? What is the value of the Server header?

    ../../_images/lab2_verify-remove.png

Attention

OPTIONAL: Instead of removing the Server header in the response, change the value of the Server header to Microsoft-IIS/7.0.

../../_images/lab2_verify.png