Forum Discussion

Ronenb's avatar
Icon for Cirrus rankCirrus
Aug 15, 2022

RED/GREEN/BLURE OVA servers for demo lab

Hello   I am buiding a demo lab  Can someone help me to download web servers (red, blue, green)  OVF files ? or can some one share the link where i can download these files ?
  • StephanManthey's avatar
    Aug 15, 2022

    Instead of using using webservers I prefer to have some virtual servers running on a 2nd BIG-IP that will respond like webservers.

    The replies are send by an iRule like this:

    when HTTP_REQUEST {
      set cookielist ""
      foreach cookieinfo [HTTP::header values "Cookie:"] {
        append cookielist [string map -nocase {"; " "<br/>"} $cookieinfo]
      if {[HTTP::cookie exists TestSessionID]} {
        set sessionid "TestSessionID=[HTTP::cookie value TestSessionID]"
      else {
        set sessionid "TestSessionID=[format %09d [expr int(rand()*1e9)]].[format %09d [expr int(rand()*1e9)]]"
    #  use standard color names, i.e. "Blue", "Red", "Green", "Yellow", "Brown", "White", "Magenta", "Pink", "Gray"
      set servercolor "Blue"
      if {[string tolower [HTTP::uri]] starts_with "/text"} {
        set page \
    \[HTTP::header X-Forwarded-For\]\t\t[HTTP::header X-Forwarded-For]
    \[HTTP::header Virtual-Server-IP\]\t\t[HTTP::header Virtual-Server-IP]
    \[HTTP::header X-Offloaded-SSL\]\t\t[HTTP::header X-Offloaded-SSL]
    Random Number\t\t\t\t[format %04d [expr int(rand()*1e4)]]\n"
      } else {
        set page \
    "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\">
    <html><head><title>Server $servercolor</title></head>
    <body text=#000000 bgcolor=$servercolor>
    <h2><font face=Verdana>Server $servercolor</font></h2>
    <font face=Verdana><table border cellpadding=2 bgcolor=#C0C0C0>
    <tr><td>\[HTTP::header X-Forwarded-For\]</td><td>[HTTP::header X-Forwarded-For]&nbsp;</td></tr>
    <tr><td>\[HTTP::header Virtual-Server-IP\]</td><td>[HTTP::header Virtual-Server-IP]&nbsp;</td></tr>
    <tr><td>\[HTTP::header X-Offloaded-SSL\]</td><td>[HTTP::header X-Offloaded-SSL]&nbsp;</td></tr>
    <tr><td>Clientside Cookies:</td><td>$cookielist&nbsp;</td></tr>
    <tr><td>Random Number:</td><td><font color=red>[format %04d [expr int(rand()*1e4)]]&nbsp;</font></td></tr>
      HTTP::respond 200 -version auto content "$page" noserver Set-Cookie $sessionid Server "$servercolor" Date "[clock format [clock seconds] -format {%a, %b %d %Y %H:%M:%S GMT} -gmt 1]"
      event disable

    This one can easily be enhanced to mirror different request parameters.

    It works as well for cURL with plain text replies:

    # curl -H 'Host:' -sv
    *   Trying
    * Connected to ( port 80 (#0)
    > GET /text/testpath?param=queryparam HTTP/1.1
    > Host:
    > User-Agent: curl/7.47.1
    > Accept: */*
    < HTTP/1.1 200 OK
    < Set-Cookie: TestSessionID=123988933.882004550
    < Server: Blue
    < Date: Mon, Aug 15 2022 17:50:31 GMT
    < Connection: Keep-Alive
    < Content-Length: 385
    [HTTP::uri]                             /text/testpath?param=queryparam
    [HTTP::path]                            /text/testpath
    [HTTP::query]                           param=queryparam
    [HTTP::header X-Forwarded-For]
    [HTTP::header Virtual-Server-IP]
    [HTTP::header X-Offloaded-SSL]
    Random Number                           8504