-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Updated firewall rule functionality (#78)
- Loading branch information
1 parent
961c8fd
commit 4bda76a
Showing
6 changed files
with
224 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name = "sophosfirewall-python" | |
packages = [ | ||
{ include = "sophosfirewall_python" }, | ||
] | ||
version = "0.1.47" | ||
version = "0.1.48" | ||
description = "Python SDK for Sophos Firewall" | ||
authors = ["Matt Mullen <[email protected]>"] | ||
readme = "README.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<Request> | ||
<Login> | ||
<Username>{{username}}</Username> | ||
<Password >{{password}}</Password> | ||
</Login> | ||
<Set operation="update"> | ||
<FirewallRule transactionid=""> | ||
<Name>{{ rulename }}</Name> | ||
<Description>{{ description if description else '' }}</Description> | ||
<IPFamily>IPv4</IPFamily> | ||
<Status>{{ status }}</Status> | ||
<Position>{{ position }}</Position> | ||
<PolicyType>Network</PolicyType> | ||
{% if position == 'After' %} | ||
<After> | ||
<Name>{{ after_rulename }}</Name> | ||
</After> | ||
{% endif %} | ||
{% if position == 'Before' %} | ||
<Before> | ||
<Name>{{ before_rulename }}</Name> | ||
</Before> | ||
{% endif %} | ||
<NetworkPolicy> | ||
<Action>{{ action }}</Action> | ||
<LogTraffic>{{ log }}</LogTraffic> | ||
<SkipLocalDestined>Disable</SkipLocalDestined> | ||
{% if src_zones %} | ||
<SourceZones> | ||
{% for zone in src_zones %} | ||
<Zone>{{ zone }}</Zone> | ||
{% endfor %} | ||
</SourceZones> | ||
{% endif %} | ||
{% if dst_zones %} | ||
<DestinationZones> | ||
{% for zone in dst_zones %} | ||
<Zone>{{ zone }}</Zone> | ||
{% endfor %} | ||
</DestinationZones> | ||
{% endif %} | ||
<Schedule>All The Time</Schedule> | ||
<SourceNetworks> | ||
{% for network in src_networks %} | ||
<Network>{{ network }}</Network> | ||
{% endfor %} | ||
</SourceNetworks> | ||
<DestinationNetworks> | ||
{% for network in dst_networks %} | ||
<Network>{{ network }}</Network> | ||
{% endfor %} | ||
</DestinationNetworks> | ||
<Services> | ||
{% for service in service_list %} | ||
<Service>{{ service }}</Service> | ||
{% endfor %} | ||
</Services> | ||
</NetworkPolicy> | ||
</FirewallRule> | ||
</Set> | ||
</Request> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters