November 23, 2017
Bypass rules for a firewall in a VSI.

Important manual pages:

Author: SoftLayer Technologies, Inc. <>

import SoftLayer
import json

USERNAME = 'set me'
API_KEY = 'set me'

vsiIp = ""

client = SoftLayer.Client(username=USERNAME, api_key=API_KEY)
guestService = client['SoftLayer_Virtual_Guest']
firewallService = client['SoftLayer_Network_Component_Firewall']
firewallUpdateService = client['SoftLayer_Network_Firewall_Update_Request']

    vsi = guestService.findByIpAddress(vsiIp)
    firewall = guestService.getFirewallServiceComponent(id=vsi['id'])
    oldRules = firewallService.getRules(id=firewall['id'])
    template = {
        'bypassFlag': True,
        'networkComponentFirewallId': firewall['id'],
        'rules': oldRules
    result = firewallUpdateService.createObject(template)
    print(json.dumps(result, sort_keys=True, indent=2, separators=(',', ': ')))
except SoftLayer.SoftLayerAPIError as e:
    print("Unable to bypass the rules. faultCode=%s, faultString=%s" % (e.faultCode, e.faultString))


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue