- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-11-2019 05:45 AM
Hello guys, does anybody know how to use ansible or other Palo alto automation tool to create a security profile? eg. a new URL filtering where I will decide what is deny and what is just alert to log?
I saw that we can pass a profile as a parameter to create a rule, but I can't find how to define my own profiles.
10-11-2019 08:28 PM
Are you looking to create a profile-group in XML or simply specify the profiles individually?
The XML attached to the security rulebase entry would look like the following if you specify profiles individually
<profile-setting>
<profiles>
<url-filtering>
<member>alert-all</member>
</url-filtering>
</profiles>
</profile-setting>
Or it would look like the following if you utilize groups:
<profile-setting>
<group>
<member>Standard-Protection-Profile</member>
</group>
</profile-setting>
Or if you are looking to specify a new profile completely it really depends on what type of profile you are actually creating, so as in your example it would look something like the following.
<entry name="alert-all">
<enable-container-page>yes</enable-container-page>
<description>tap-zone</description>
<log-container-page-only>yes</log-container-page-only>
<credential-enforcement>
<mode>
<disabled/>
</mode>
<log-severity>medium</log-severity>
<block>
<member>Block-URLs</member>
</block>
</credential-enforcement>
<alert>
<member>abortion</member>
<member>abused-drugs</member>
<member>adult</member>
<member>alcohol-and-tobacco</member>
<member>auctions</member>
<member>business-and-economy</member>
<member>command-and-control</member>
<member>computer-and-internet-info</member>
<member>content-delivery-networks</member>
<member>copyright-infringement</member>
<member>dating</member>
<member>dynamic-dns</member>
<member>educational-institutions</member>
<member>entertainment-and-arts</member>
<member>extremism</member>
<member>financial-services</member>
<member>gambling</member>
<member>games</member>
<member>hacking</member>
<member>health-and-medicine</member>
<member>home-and-garden</member>
<member>hunting-and-fishing</member>
<member>insufficient-content</member>
<member>internet-communications-and-telephony</member>
<member>internet-portals</member>
<member>job-search</member>
<member>legal</member>
<member>malware</member>
<member>military</member>
<member>motor-vehicles</member>
<member>music</member>
<member>news</member>
<member>not-resolved</member>
<member>nudity</member>
<member>online-storage-and-backup</member>
<member>parked</member>
<member>peer-to-peer</member>
<member>personal-sites-and-blogs</member>
<member>philosophy-and-political-advocacy</member>
<member>phishing</member>
<member>private-ip-addresses</member>
<member>proxy-avoidance-and-anonymizers</member>
<member>questionable</member>
<member>real-estate</member>
<member>recreation-and-hobbies</member>
<member>reference-and-research</member>
<member>religion</member>
<member>search-engines</member>
<member>sex-education</member>
<member>shareware-and-freeware</member>
<member>shopping</member>
<member>social-networking</member>
<member>society</member>
<member>sports</member>
<member>stock-advice-and-tools</member>
<member>streaming-media</member>
<member>swimsuits-and-intimate-apparel</member>
<member>training-and-tools</member>
<member>translation</member>
<member>travel</member>
<member>unknown</member>
<member>weapons</member>
<member>web-advertisements</member>
<member>web-based-email</member>
<member>web-hosting</member>
<member>Microsoft</member>
</alert>
<allow>
<member>government</member>
</allow>
<block>
<member>whatever-you-would-block</member>
</block>
<action>block</action>
</entry>
10-11-2019 08:28 PM
Are you looking to create a profile-group in XML or simply specify the profiles individually?
The XML attached to the security rulebase entry would look like the following if you specify profiles individually
<profile-setting>
<profiles>
<url-filtering>
<member>alert-all</member>
</url-filtering>
</profiles>
</profile-setting>
Or it would look like the following if you utilize groups:
<profile-setting>
<group>
<member>Standard-Protection-Profile</member>
</group>
</profile-setting>
Or if you are looking to specify a new profile completely it really depends on what type of profile you are actually creating, so as in your example it would look something like the following.
<entry name="alert-all">
<enable-container-page>yes</enable-container-page>
<description>tap-zone</description>
<log-container-page-only>yes</log-container-page-only>
<credential-enforcement>
<mode>
<disabled/>
</mode>
<log-severity>medium</log-severity>
<block>
<member>Block-URLs</member>
</block>
</credential-enforcement>
<alert>
<member>abortion</member>
<member>abused-drugs</member>
<member>adult</member>
<member>alcohol-and-tobacco</member>
<member>auctions</member>
<member>business-and-economy</member>
<member>command-and-control</member>
<member>computer-and-internet-info</member>
<member>content-delivery-networks</member>
<member>copyright-infringement</member>
<member>dating</member>
<member>dynamic-dns</member>
<member>educational-institutions</member>
<member>entertainment-and-arts</member>
<member>extremism</member>
<member>financial-services</member>
<member>gambling</member>
<member>games</member>
<member>hacking</member>
<member>health-and-medicine</member>
<member>home-and-garden</member>
<member>hunting-and-fishing</member>
<member>insufficient-content</member>
<member>internet-communications-and-telephony</member>
<member>internet-portals</member>
<member>job-search</member>
<member>legal</member>
<member>malware</member>
<member>military</member>
<member>motor-vehicles</member>
<member>music</member>
<member>news</member>
<member>not-resolved</member>
<member>nudity</member>
<member>online-storage-and-backup</member>
<member>parked</member>
<member>peer-to-peer</member>
<member>personal-sites-and-blogs</member>
<member>philosophy-and-political-advocacy</member>
<member>phishing</member>
<member>private-ip-addresses</member>
<member>proxy-avoidance-and-anonymizers</member>
<member>questionable</member>
<member>real-estate</member>
<member>recreation-and-hobbies</member>
<member>reference-and-research</member>
<member>religion</member>
<member>search-engines</member>
<member>sex-education</member>
<member>shareware-and-freeware</member>
<member>shopping</member>
<member>social-networking</member>
<member>society</member>
<member>sports</member>
<member>stock-advice-and-tools</member>
<member>streaming-media</member>
<member>swimsuits-and-intimate-apparel</member>
<member>training-and-tools</member>
<member>translation</member>
<member>travel</member>
<member>unknown</member>
<member>weapons</member>
<member>web-advertisements</member>
<member>web-based-email</member>
<member>web-hosting</member>
<member>Microsoft</member>
</alert>
<allow>
<member>government</member>
</allow>
<block>
<member>whatever-you-would-block</member>
</block>
<action>block</action>
</entry>
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!