如何通过加快文件阻止配置文件创建和修改 CLI
Objective
- 在某些情况下,当您配置文件阻止配置文件添加和删除"文件类型"可能是一项艰巨的任务,因为当前 GUI 选项不提供复选框或其他简单的方法。
- 对于支持列表中的每个文件类型,需要单击"滚动"添加并查找文件类型以自定义规则。
Environment
- PA-5250
- PAN-OS v.8.1及以上
Procedure
为了加快文件阻止配置文件中文件类型的添加或删除过程,您可以使用 CLI
:1. 将 CLI 输出格式调整为"设置"。
PA-VMadmin@>集cli配置输出格式集
2。 使用创建的新配置文件名称查看当前支持的文件。
要查看支持的文件类型,请在命令末尾使用问号(?)。
admin@PA-VM> configure admin@PA-VM# set profiles file-blocking "File Blocking Profile File Type" rules "Exclude Encrypted" file-type ? admin@PA-VM# set profiles file-blocking "File Blocking Profile File Type" rules "Exclude Encrypted" file-type [ Start a list of values. 7z file-type 7z Multi-Level-Encoding file-type Multi-Level-Encoding PE file-type PE access-shortcut file-type access-shortcut ace file-type ace ade file-type ade adp file-type adp ai file-type ai aip-encrypted-docx file-type aip-encrypted-docx aip-encrypted-pptx file-type aip-encrypted-pptx aip-encrypted-xlsx file-type aip-encrypted-xlsx any All file types apk file-type apk arj file-type arj asp file-type asp avi file-type avi
.
.
输出故意减少,使其简洁。
3. 要将其缩小到选定的文件类型列表,文件类型可以列在按空间分开的方括号 [] 内。
在撰写本文时, 支持的文件类型的完整列表在一行是
:[7z多级编码 PE 访问-快捷方式王牌ad adp aid ai aip-加密-多克克斯艾普-加密-pptx aip-加密-xlsx任何apk arj aj avi-avi-divx avi-xvid bas蝙蝠bmp-上传bzip2出租车部分cdr chm cin类 cmd com csv放气64-zip德dll dmg文档文档x dpx dsn dwf dwg dxf edif精灵emf加密-7z加密文档加密-docx加密办公室2007加密-pdf加密-ppt加密-pptx加密-拉加密-x lsx加密-zip eps exe exr闪光flv gds gif-上传gzip hlp hta hwp hwpx伊奇塔罗iff inf ins iqy iso其iwork-基调iwork-数字iwork页面罐jpeg jpeg-上传js jse lnk lzh马马卡马赫-o mb姆达姆德姆德姆迪mdt mdw mdz mht微软壳米夫mkv mov mp3 mp4 mpeg mpeg-tsmpkg msc msi毫秒办公室msp ocx pbix pbm pcl pdf pem pgp pf pkg pl png png上传电源壳ppt pptx prg psd py拉尔雷格重新命名-拉普兹r rm rpf ftf scr什克什什slk softimg拆分出租车拆分-rar stp svg svg sys tar tdb蒂夫蒂夫tiff tmp洪流网址vb vbe vbs vxdweb wmf wmv wri wsf wsh xll xls xls xpm压缩拉链]-
编辑列表在你最喜欢的文本编辑器和附录所需的列表到命令。例如,Notepad® 已用于有选择地排除加密文件类型以应用块操作。
在下面的示例中,已排除带有加密关键字的文件类型:
[edit] admin@PA-VM# set profiles file-blocking "File Blocking Profile File Type" rules "Exclude Encrypted" file-type [ aip-encrypted-docx aip-encrypted-pptx aip-encrypted-xlsx encrypted-7z encrypted-doc encrypted-docx encrypted-office2007 encrypted-pdf encrypted-ppt encrypted-pptx encrypted-rar encrypted-xls encrypted-xlsx encrypted-zip ] admin@PA-VM# set profiles file-blocking "File Blocking Profile File Type" rules "Exclude Encrypted" action block admin@PA-VM# set profiles file-blocking "File Blocking Profile File Type" rules "Exclude Encrypted" application any
admin@ PA-VM #设置配置文件阻止文件拦截 "文件阻止配置文件类型" 规则 "其他" 文件类型 [ 7z 多级编码 PE 访问快捷方式王牌 ade adp ai 任何 apk arj asp avi avi - divx avi - xvid bas bmp bmp 上传 bzip2 驾驶室猫部分 cdr chm cin 类 cmd com cpl csv放气64-zip德德尔dmg文档文档x dsn dwf dxf edif精灵epsexexr闪光flv gds gif上传gzip hlp hta hwp hwp hwpx伊奇塔罗iff因斯iqy iso其工作-主题iwork 数字 iwork 页面罐 jpeg jpeg 上传 js jse lnk lzh 马马卡普马奇 - o mb mda mdb mdi mdt mdw mdz mht 微软壳米夫 mkv 莫夫 mp3 mp4 mpeg mp - ts mpkg msc msi msoffice msp ocx pbix pbm pcl pdf pm pgp 皮夫 pkg pl png png-上传电源壳ppt pptx pptx pg psd py rar雷格重命名-zip r rm rpf rtf scf scr sg什克什什斯斯·斯尔克·斯金格分裂-拉尔斯stp svg sys tar tdb蒂夫蒂夫tiff tmp洪流网址vb vbe vbs vxd网络wmf wmv wri wsf w什xl xls xx下午压缩拉链]
admin@PA-VM# set profiles file-blocking "File Blocking Profile File Type" rules "Others" action alert admin@PA-VM# set profiles file-blocking "File Blocking Profile File Type" rules Others application any admin@PA-VM# commit
结果可以进一步审查 GUI ,以作出轻微的调整。
提交更改并将配置文件应用到 policy 。 。 可以根据需要复制其他配置文件规则。
*请注意:
"任何"文件类型都包含在步骤 2 的列表中。"任何"文件类型经常被忽视,请注意。