Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
🔍 Discover Our Product Documentation

Barracuda Web Application Firewall
Results will update as you type.
  • How to Update Your Notification Email Addresses
  • What's New in the Barracuda Web Application Firewall
  • 30-Day Evaluation Guide - Barracuda Web Application Firewall
  • Getting Started
  • Deployment
  • Services
  • Securing HTTP/HTTPS Traffic
  • Advanced Bot Protection
  • Client-Side Protection
  • API Security
  • Advanced Security
  • IP Reputation-Based Filters
  • Tuning Security Rules
  • Barracuda Active Threat Intelligence
  • Access Control
  • Traffic Management
  • Configuring User-Defined Patterns
  • Logging, Reporting and Monitoring
  • High Availability
  • Networking
  • System Administration and Maintenance
  • Certificate Management
  • Centralized Management of the Barracuda Web Application Firewall
  • Attacks Description - Action Policy
  • REST API
    • REST API Version 1 (v1)
      • Advanced Security and Clickjacking Protection
      • Allow/Deny Rules
      • Certificates
      • Clustering
      • Content Rule
      • Custom Parameter Class and Custom Attack Types
      • Logs
      • Rule Group Server
      • Security Policy
      • Server
      • Service Group
      • Status Codes and Error Responses
      • Trusted Hosts
      • Virtual Service
      • Vsites
      • Website Profiles
    • REST API Version 3 (v3)
    • How to Generate API Calls
    • File-Based Configuration Management for Barracuda Web Application Firewall
    • Using Postman for Barracuda Web Application Firewall APIs
    • How to Enable Dual-Factor Authentication for the Barracuda Web Application Firewall Web Interface Access
    • REST API to Manage Multi-IP on Azure and AWS Cloud Deployments
  • Common Web Application Attacks
  • How to Set Up Barracuda Cloud Control
  • End of Support and End of Life Information
  • Critical Vulnerabilities in Web Application
  • Barracuda Advanced Bot Protection Cloud Infrastructure Upgrade Information
  • Barracuda WAF 12.2 Firmware Hardened to Augment Security of Product Features

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Virtual Service
    Published Jul 05, 2021

    Virtual Service

    Jul 05, 2021
    Subscribe

    A "Virtual Service" is a combination of a Virtual IP (VIP) address and a TCP port, which listens and directs the traffic to the intended service.

    To Create a Virtual Service

    URL: /v1/virtual_services

    Method: POST

    Description: Creates a virtual service with the given values.

    Parameter Name

    Data Type

    Mandatory

    Description

    Input Parameters:

     

     

     

    name

    Alphanumeric

    Yes

    The name of the new service.

    ip_address

    Numeric

    Yes

    The virtual IP address that will be used for accessing this application.

    port

    Numeric

    Yes

    The port number on which your web server responds.

    type

    Enumeration

    Yes

    The type of the service you want to create. The enumerated values include:

    • HTTP

    • HTTPS

    • FTP

    • FTPSSL

    • CUSTOM

    • CUSTOMSSL

    • INSTANTSSL

    • REDIRECT (for Redirect service)

    address_version

    Enumeration

    Yes

    The internet protocol version of the service. The enumerated values include:

    • ipv4

    • ipv6

    vsite

    Alphanumeric

    Optional

    The name of the vsite under which the service needs to be created.

    Note: This field is required ONLY when the service needs to be created under a specific vsite. If not, the service will be created under the default vsite.

    group

    Alphanumeric

    Optional

    The name of the service group under which the service needs to be created.

    Note: This field is required ONLY when the service needs to be created under a specific service group. If not, the service will be created under the default service group.

    certificate

    Alphanumeric

    Conditional

    The certificate that needs to be presented to the browser when accessing this Service.

    Note: This is a required parameter

    ONLY when the service is HTTPS, Instant SSL, Custom SSL or FTP SSL.

    service_hostname

    Alphanumeric

    Conditional

    The domain name to identify and rewrite HTTP requests to HTTPS.

    Note: This is a required parameter ONLY when the service is Instant SSL.

    Output Parameters:

     

     

     

    id

    Alphanumeric

     

    The name of the service that got created.

    Example: HTTP Service

    Request:

    curl http://192.168.0.1:8000/restapi/v1/virtual_services -u 'eyJldCI6IjEnYzYzZTFjIiwidXNlciI6ImFkbWluIn0=\n:' -X POST -H Content-Type:application/json -d '{"name": "demo_service_3", "ip_address": "10.11.16.176", "port": "80", "type":"http", "address_version":"ipv4", "vsite":"demo_vsite", "group":"demo_vsite_group"}'

    Response:

    {"id":"demo_service_3","token":"eyJldCI6IjEzNzk2ODMxIiwidXNlciI6ImFkbWluIn0=\n"}

    Example: HTTPS Service

    Request:

     curl http://192.168.0.1:8000/restapi/v1/virtual_services -u 'eyJldCI6IjEzxMTEwIiwidXNlciI6ImFkbWluIn0=\n:' -X POST -H Content-Type:application/json –d

    '{
    "certificate": "cert1",
    "address_version": "ipv4",
    "name": "demo_service_2",
    "type": "https",
    "ip_address": "10.11.12.138",
    "port": "80"
    }'

    Response:

    {"id":"demo_service_2","token":"eyJldCI6IjTQzODMxIiwidXNlciI6ImFkbWluIn0=\n"}


    We value your feedback.
    If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
    For general product inquiries or technical support, please contact the global Barracuda Support team.

    {"serverDuration": 34, "requestCorrelationId": "b6cb0f968da24ec8971319ffc81e7655"}