How to add new firewall ips inside vdom addresses using port 8443? #25
-
|
Really appreciate your efforts to maintain this project. I have query regarding adding new IPs under VDOM. We have below function which actually add IPs to firewall. *response = api.cmdb.firewall.address.create(data) Also, is it possible to use port 8443 for create firewall address operation? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
To use another TCP port, initialize the 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: The best thanks is to star this project |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! |
Beta Was this translation helpful? Give feedback.
To use another TCP port, initialize the
FortigateAPIwith theportparameter.Before adding an address to a specific VDOM, initialize the
FortigateAPIwith thevdomparameterand after that call
createmethodFor usage examples, you can refer to the following links:
https://github.com/vladimirs-git/fortigate-…