Skip to content

How to add new firewall ips inside vdom addresses using port 8443? #25

Discussion options

You must be logged in to vote

To use another TCP port, initialize the FortigateAPI with the port parameter.
Before adding an address to a specific VDOM, initialize the FortigateAPI with the vdom parameter
and after that call create method

    from fortigate_api import FortiGateAPI

    api = FortiGateAPI(host="HOST", username="USERNAME", password="PASSWORD", port=8443, vdom="VDOM")
    data = {
        "name": "ADDRESS",
        "obj-type": "ip",
        "subnet": "127.0.0.100 255.255.255.252",
        "type": "ipmask",
    }
    response = api.cmdb.firewall.address.create(data)
    print(f"address.create {response}")

For usage examples, you can refer to the following links:
https://github.com/vladimirs-git/fortigate-…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by datta-shitole
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #24 on January 21, 2024 09:17.