Firewall CLI config
Browse files
app.py
CHANGED
@@ -56,13 +56,23 @@ def predict(message, history, system_prompt, temperature, max_tokens):
|
|
56 |
outputs.append(text)
|
57 |
yield "".join(outputs)
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
if __name__ == "__main__":
|
62 |
args = parse_args()
|
63 |
-
tokenizer = AutoTokenizer.from_pretrained("lliu01/
|
64 |
model = AutoModelForCausalLM.from_pretrained(
|
65 |
-
"lliu01/
|
66 |
torch_dtype=torch.bfloat16,
|
67 |
low_cpu_mem_usage=True
|
68 |
)
|
@@ -79,18 +89,18 @@ if __name__ == "__main__":
|
|
79 |
undo_btn="Delete Previous",
|
80 |
clear_btn="Clear",
|
81 |
additional_inputs=[
|
82 |
-
gr.Textbox("FortiOS firewall policy configuration.", label="System Prompt"),
|
83 |
gr.Slider(0, 1, 0.5, label="Temperature"),
|
84 |
gr.Slider(100, 2048, 1024, label="Max Tokens"),
|
85 |
],
|
86 |
examples=[
|
87 |
-
["
|
88 |
-
["
|
89 |
-
["
|
90 |
-
["
|
91 |
-
["
|
92 |
-
["
|
93 |
-
["
|
94 |
],
|
95 |
additional_inputs_accordion_name="Parameters",
|
96 |
).queue().launch()
|
|
|
56 |
outputs.append(text)
|
57 |
yield "".join(outputs)
|
58 |
|
59 |
+
"""
|
60 |
+
examples=[
|
61 |
+
["How can you move a policy by policy ID?"],
|
62 |
+
["What is the command to enable security profiles in a firewall policy?"],
|
63 |
+
["How do you configure a service group in the GUI?"],
|
64 |
+
["How can you configure the firewall policy change summary in the CLI?"],
|
65 |
+
["How do you disable hardware acceleration for an IPv4 firewall policy in the CLI?"],
|
66 |
+
["How can you enable WAN optimization in a firewall policy using the CLI?"],
|
67 |
+
["What are services in FortiOS and how are they used in firewall policies?"],
|
68 |
+
],
|
69 |
+
"""
|
70 |
|
71 |
if __name__ == "__main__":
|
72 |
args = parse_args()
|
73 |
+
tokenizer = AutoTokenizer.from_pretrained("lliu01/fortios")
|
74 |
model = AutoModelForCausalLM.from_pretrained(
|
75 |
+
"lliu01/fortios",
|
76 |
torch_dtype=torch.bfloat16,
|
77 |
low_cpu_mem_usage=True
|
78 |
)
|
|
|
89 |
undo_btn="Delete Previous",
|
90 |
clear_btn="Clear",
|
91 |
additional_inputs=[
|
92 |
+
gr.Textbox("FortiOS CLI firewall policy configuration.", label="System Prompt"),
|
93 |
gr.Slider(0, 1, 0.5, label="Temperature"),
|
94 |
gr.Slider(100, 2048, 1024, label="Max Tokens"),
|
95 |
],
|
96 |
examples=[
|
97 |
+
["Allow all traffic from any source IP address and any source interface 'port10' to any destination IP address and any destination interface 'port9'. This policy will be applied at all times (always) and will allow all services. Additionally, this policy will enable UTM features, use proxy-based inspection mode, and use an SSL-SSH profile named 'deep-custom'. Finally, this policy will also enable source NAT."],
|
98 |
+
["Configure a firewall policy to allow users 'dina' and '15947' to access 'DR-Exchange-Servers' and 'HQ-Exchange-Servers' using RDP protocol from the 'SSL-VPN-IT-Pool' address range, incoming from the 'ssl.FG-Traffic' interface and outgoing to the 'FG-PA-Inside' interface. The policy should have Antivirus scanning enabled with profile 'ABE_AV' and log all traffic. The policy should be always active and currently disabled for testing or maintenance purposes."],
|
99 |
+
["Configure a firewall policy named 'ZoomAccess' that allows traffic from the 'IP_10.96.54.149' and 'HighCourt_Zoom' addresses coming in through the 'VLAN51' interface to access the 'Zoom_access' destination through the 'npu0_vlink1' interface, at any time, with all services allowed, using proxy-based inspection and SSL certificate inspection."],
|
100 |
+
["I want to enable packet capture for firewall policy 22, so that packets matching this policy are captured for troubleshooting and analysis purposes."],
|
101 |
+
["I want to configure the firewall policy to enable TCP NPU session delay, ensuring that the packet order of the 3-way handshake is guaranteed."],
|
102 |
+
["I want to configure a firewall policy with the inspection mode set to 'flow' to enable flow-based inspection, allowing the firewall to track the state of network flows and make decisions based on that state."],
|
103 |
+
["I want to enable the Security Group Tags (SGT) check in firewall policy 52."],
|
104 |
],
|
105 |
additional_inputs_accordion_name="Parameters",
|
106 |
).queue().launch()
|