Firewall
firewall-rule related things
AliasTypes
Bases: str
, Enum
types for firewall aliases
Source code in pfsense_api_client/firewall.py
67 68 69 70 71 72 |
|
FirewallAliasUpdate
Bases: pydantic.BaseModel
validating the firewall alias update
Source code in pfsense_api_client/firewall.py
76 77 78 79 80 81 82 83 84 |
|
FirewallMixin
Bases: BasePFSenseAPIClient
mixin class for firewall functions
Source code in pfsense_api_client/firewall.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 |
|
apply_firewall_changes()
Apply pending firewall changes. This will reload all filter items. This endpoint returns no data.
https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-apply-firewall
Source code in pfsense_api_client/firewall.py
200 201 202 203 204 205 206 207 208 |
|
create_firewall_alias(name, alias_type, descr, address, detail, apply=True)
Add a new host, network or port firewall alias. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-firewall-aliases
Source code in pfsense_api_client/firewall.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|
create_firewall_alias_entry(**args)
Add new entries to an existing firewall alias. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-firewall-alias-entries
Source code in pfsense_api_client/firewall.py
178 179 180 181 182 183 184 185 186 187 |
|
create_firewall_nat_one_to_one(**args)
Add a new NAT 1:1 Mapping. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-nat-1-to-1-mappings
Source code in pfsense_api_client/firewall.py
211 212 213 214 215 216 217 218 |
|
create_firewall_rule(**args)
Create firewall rules
https://github.com/jaredhendrickson13/pfsense-api#3-read-firewall-rules
Source code in pfsense_api_client/firewall.py
563 564 565 566 567 568 569 570 571 |
|
create_firewall_schedule(**args)
Add a firewall schedule. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-schedule
Source code in pfsense_api_client/firewall.py
359 360 361 362 363 364 365 366 |
|
create_limiter_bandwidth(**args)
Create a limiter bandwidth setting. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-limiter-bandwidth
Source code in pfsense_api_client/firewall.py
523 524 525 526 527 528 529 530 |
|
create_limiter_queue(**args)
Add a child queue to an existing traffic shaper limiter https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-limiter-queue
Source code in pfsense_api_client/firewall.py
543 544 545 546 547 548 549 550 |
|
create_nat_port_forward(**args)
Add a new NAT port forward rule.
Source code in pfsense_api_client/firewall.py
306 307 308 309 310 311 312 |
|
create_outbound_nat_mapping(**args)
Create new outbound NAT mappings. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-outbound-nat-mappings
Source code in pfsense_api_client/firewall.py
263 264 265 266 267 268 269 270 |
|
create_schedule_time_range(**args)
Add a time range to an existing firewall schedule. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-schedule-time-range
Source code in pfsense_api_client/firewall.py
397 398 399 400 401 402 403 404 |
|
create_traffic_shaper(**args)
Add a traffic shaper policy to an interface. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-traffic-shaper
Source code in pfsense_api_client/firewall.py
452 453 454 455 456 457 458 459 |
|
create_traffic_shaper_limiter(**args)
Add a traffic shaper limiter. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-limiter
Source code in pfsense_api_client/firewall.py
493 494 495 496 497 498 499 500 |
|
create_traffic_shaper_queue(**args)
Add a queue to an traffic shaper interface. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-traffic-shaper-queue
Source code in pfsense_api_client/firewall.py
614 615 616 617 618 619 620 621 |
|
create_virtual_ip(**args)
Add a new virtual IP. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-create-virtual-ips
Source code in pfsense_api_client/firewall.py
634 635 636 637 638 639 640 641 |
|
delete_all_firewall_rules()
Deletes all existing firewall rules. This is useful for scripts that need to setup the firewall rules from scratch.
Note: this endpoint will not reload the firewall filter automatically, you must make another API call to the /api/v1/firewall/apply endpoint to do so. Ensure firewall rules are created before reloading the filter to prevent lockout!.
https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#1-delete-all-firewall-rules
Source code in pfsense_api_client/firewall.py
348 349 350 351 352 353 354 355 356 |
|
delete_firewall_alias(name, apply=True)
Delete an existing alias and (optionally) reload filter. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-firewall-aliases
field: id in the API is 'name' because 'id' is reserved in python.
Source code in pfsense_api_client/firewall.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
delete_firewall_alias_entry(**args)
Delete existing entries from an existing firewall alias. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-firewall-alias-entries
Source code in pfsense_api_client/firewall.py
190 191 192 193 194 195 196 197 |
|
delete_firewall_nat_one_to_one(**args)
Delete a NAT 1:1 Mapping. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-nat-1-to-1-mappings
Source code in pfsense_api_client/firewall.py
221 222 223 224 225 226 227 228 |
|
delete_firewall_rule(name, apply)
Delete firewall rules
https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-firewall-rules
Source code in pfsense_api_client/firewall.py
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
|
delete_firewall_schedule(**args)
Delete a firewall schedule. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-schedule
Source code in pfsense_api_client/firewall.py
369 370 371 372 373 374 375 376 |
|
delete_limiter_bandwidth(**args)
Delete a limiter bandwidth setting. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-limiter-bandwidth
Source code in pfsense_api_client/firewall.py
533 534 535 536 537 538 539 540 |
|
delete_limiter_queue(**args)
Delete a child queue from an existing traffic shaper limiter https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-limiter-queue
Source code in pfsense_api_client/firewall.py
553 554 555 556 557 558 559 560 |
|
delete_nat_port_forward(**args)
Delete a NAT port forward rule. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-nat-port-forwards
Source code in pfsense_api_client/firewall.py
315 316 317 318 319 320 321 322 323 324 |
|
delete_outbound_nat_mapping(**args)
name: str apply: Optional[bool] Delete outbound NAT mappings. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-outbound-nat-mappings
Source code in pfsense_api_client/firewall.py
273 274 275 276 277 278 279 280 281 282 |
|
delete_schedule_time_range(**args)
Delete a time range from an existing firewall schedule. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-schedule-time-range
Source code in pfsense_api_client/firewall.py
407 408 409 410 411 412 413 414 |
|
delete_traffic_shaper(**args)
Delete a traffic shaper policy from an interface. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-traffic-shaper
Source code in pfsense_api_client/firewall.py
462 463 464 465 466 467 468 469 |
|
delete_traffic_shaper_limiter(**args)
Add a traffic shaper limiter. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-limiter
Source code in pfsense_api_client/firewall.py
503 504 505 506 507 508 509 510 |
|
delete_traffic_shaper_queue(**args)
Delete a queue from an traffic shaper interface. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-traffic-shaper-queue
Source code in pfsense_api_client/firewall.py
624 625 626 627 628 629 630 631 |
|
delete_virtual_ip(**args)
Delete a virtual IP. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-delete-virtual-ips
Source code in pfsense_api_client/firewall.py
644 645 646 647 648 649 650 651 |
|
get_firewall_alias(**kwargs)
get a list of firewall aliases https://github.com/jaredhendrickson13/pfsense-api#3-read-firewall-aliases
Source code in pfsense_api_client/firewall.py
90 91 92 93 94 95 96 97 |
|
get_firewall_nat_one_to_one(**kwargs)
Read 1:1 NAT mappings.
https://github.com/jaredhendrickson13/pfsense-api#3-read-nat-1-to-1-mappings
Source code in pfsense_api_client/firewall.py
241 242 243 244 245 246 247 248 249 |
|
get_firewall_nat_port_forward(**kwargs)
Read NAT port forward rules.
https://github.com/jaredhendrickson13/pfsense-api#3-read-nat-port-forwards
Source code in pfsense_api_client/firewall.py
327 328 329 330 331 332 333 334 |
|
get_firewall_rule(**kwargs)
Read firewall rules
https://github.com/jaredhendrickson13/pfsense-api#3-read-firewall-rules
Source code in pfsense_api_client/firewall.py
603 604 605 606 607 608 609 610 611 |
|
get_firewall_schedule(**kwargs)
Read all existing firewall schedules.
Source code in pfsense_api_client/firewall.py
379 380 381 382 383 384 |
|
get_firewall_states(**kwargs)
Read the current firewall states.
https://github.com/jaredhendrickson13/pfsense-api#1-read-firewall-states
Source code in pfsense_api_client/firewall.py
417 418 419 420 421 422 423 424 425 |
|
get_firewall_states_size(**kwargs)
Read the maximum firewall state size, the current firewall state size, and the default firewall state size.
https://github.com/jaredhendrickson13/pfsense-api#1-read-firewall-state-size
Source code in pfsense_api_client/firewall.py
428 429 430 431 432 433 434 435 436 |
|
get_nat_outbound_mapping(**kwargs)
Read existing outbound NAT mode mappings.
https://github.com/jaredhendrickson13/pfsense-api#3-read-outbound-nat-mappings
Source code in pfsense_api_client/firewall.py
285 286 287 288 289 290 291 292 293 |
|
get_traffic_shaper(**kwargs)
Read all configured traffic shapers.
https://github.com/jaredhendrickson13/pfsense-api#3-read-traffic-shapers
Source code in pfsense_api_client/firewall.py
472 473 474 475 476 477 478 479 480 |
|
get_traffic_shaper_limiter(**kwargs)
Get the traffic shaper limiters
https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#3-read-limiters
Source code in pfsense_api_client/firewall.py
513 514 515 516 517 518 519 520 |
|
get_virtual_ip(**kwargs)
Read virtual IP assignments.
https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#3-read-virtual-ips
Source code in pfsense_api_client/firewall.py
654 655 656 657 658 659 660 |
|
update_firewall_alias(*args)
Modify an existing firewall alias.
https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#4-update-firewall-aliases
Source code in pfsense_api_client/firewall.py
162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
|
update_firewall_nat_one_to_one(**args)
Update a NAT 1:1 Mapping. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#4-update-nat-1-to-1-mappings
Source code in pfsense_api_client/firewall.py
231 232 233 234 235 236 237 238 |
|
update_firewall_rule(**args)
Update firewall rules
https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#4-update-firewall-rules
Source code in pfsense_api_client/firewall.py
591 592 593 594 595 596 597 598 599 600 |
|
update_firewall_schedule(**args)
Update a firewall schedule. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#4-update-schedule
Source code in pfsense_api_client/firewall.py
387 388 389 390 391 392 393 394 |
|
update_firewall_state_size(**args)
Modify the maximum number of firewall state table entries allowed by the system Note: use caution when making this call, setting the maximum state table size to a value lower than the current number of firewall state entries WILL choke the system https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-update-firewall-state-size
Source code in pfsense_api_client/firewall.py
439 440 441 442 443 444 445 446 447 448 449 |
|
update_nat_outbound_settings(**args)
mode: str, apply: Optional[bool] Update outbound NAT mode settings. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#2-update-outbound-nat-settings
Source code in pfsense_api_client/firewall.py
252 253 254 255 256 257 258 259 260 |
|
update_nat_port_forward(**args)
Update a NAT port forward rule. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#4-update-nat-port-forwards
Source code in pfsense_api_client/firewall.py
337 338 339 340 341 342 343 344 |
|
update_outbound_nat_mapping(**args)
Update existing outbound NAT mappings. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#4-update-outbound-nat-mappings
Source code in pfsense_api_client/firewall.py
296 297 298 299 300 301 302 303 |
|
update_traffic_shaper(**args)
Update a traffic shaper policy for an interface. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#4-update-traffic-shaper
Source code in pfsense_api_client/firewall.py
483 484 485 486 487 488 489 490 |
|
update_virtual_ip(**args)
Update a virtual IP. https://github.com/jaredhendrickson13/pfsense-api/blob/master/README.md#4-update-virtual-ips
Source code in pfsense_api_client/firewall.py
663 664 665 666 667 668 669 670 |
|