For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

cookiemonster's avatar
cookiemonster
Icon for Altostratus rankAltostratus
Feb 24, 2021

AS3 Shared Objects and Virtual Service Address Lists

Below is a declaration that will create a virtual service that has a host 1.1.1.50/32 as the allowed source host. How in AS3 do you create a shared object address list if that is possible, or if that is not possible how do reference an existing address list in the declaration so I can specify multiple source hosts rather than a subnet?

{
  "class": "AS3",
  "action": "patch",
  "patchBody": [
    {
      "op": "add",
      "path": "/{{tenant}}/testvip",
      "value": {
        "class": "Application",
        "template": "generic",
        "testvip_http_8080": {
          "class": "Service_HTTP",
          "snat": "auto",
          "virtualPort": 8080,
          "virtualAddresses": [
            ["10.10.10.10", "1.1.1.50/32"]
          ],
          "iRules": [],
          "pool": "testvip_tcp_8080_pool",
          "persistenceMethods": []
        },
        "testvip_tcp_8080_pool": {
          "class": "Pool",
          "monitors": [
            {
              "use": "testvip_http_8080_monitor"
            }
          ],
          "loadBalancingMode": "least-connections-member",
          "members": [
            {
              "adminState": "enable",
              "shareNodes": false,
              "servicePort": 8080,
              "serverAddresses": [
                "2.2.2.2"
              ],
              "hostname": "server1"
            },
            {
              "adminState": "enable",
              "shareNodes": false,
              "servicePort": 8080,
              "serverAddresses": [
                "3.3.3.3"
              ],
              "hostname": "server2"
            },
            {
              "adminState": "enable",
              "shareNodes": false,
              "servicePort": 8080,
              "serverAddresses": [
                "4.4.4.4"
              ],
              "hostname": "server3"
            }
          ]
        },
        "testvip_http_8080_monitor": {
          "class": "Monitor",
          "monitorType": "http",
          "send": "GET /keepalive.txt HTTP/1.0",
          "receive": "200"
        }
      }
    }
  ]
}

3 Replies