{"id":451,"date":"2012-10-25T06:04:00","date_gmt":"2012-10-25T06:04:00","guid":{"rendered":"http:\/\/www.houquner.com\/?p=1912"},"modified":"2012-10-25T06:04:00","modified_gmt":"2012-10-25T06:04:00","slug":"juniper-ssg-trips-1","status":"publish","type":"post","link":"https:\/\/www.houquner.com\/index.php\/archives\/451","title":{"rendered":"\u5728ScreenOS\u4e0a\u4f7f\u7528\u4fee\u6539\u547d\u4ee4\u548c\u8fd0\u884c\u811a\u672c"},"content":{"rendered":"<p>How to Run a Script on the Firewall<br \/>\n    <a href=\"http:\/\/kb.juniper.net\/InfoCenter\/index?page=content&amp;id=KB10219\">http:\/\/kb.juniper.net\/InfoCenter\/index?page=content&amp;id=KB10219<\/a><br \/>\nHere is the procedure:<\/p>\n<pre><code>Login to the device via the console, telnet, or SSH\nRun the command &amp;#39;set script record&amp;#39;\nEnter the desired commands to run during the script.\nStop the recording of commands by running the command &amp;#39;exit record&amp;#39;\nRun the script with the command &amp;#39;exec script frequency 5&amp;#39;.&amp;nbsp; This will execute the script every 5 seconds\nStop the script with the command &amp;#39;exec script stop&amp;#39;\nTo obtain the output of the script, issue the command &amp;#39;get script&amp;#39;\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre><code>How to modify commands in ScreenOS\nhttp:\/\/kb.juniper.net\/InfoCenter\/index?page=content&amp;id=KB25685\n<\/code><\/pre>\n<p>&nbsp;<br \/>\nFor example:<br \/>\nAn address book entry is created:<br \/>\n    SSG20-&gt; set address &quot;Trust&quot; &quot;h_internal&quot; 1.1.1.2 255.255.255.255 This address is used in a policy:<br \/>\n    SSG20-&gt;set policy from trust to untrust &quot;h_internal&quot; any ICMP-ANY permit<br \/>\nSSG20-&gt;get conf | i &quot;h_internal&quot;<br \/>\n    set address &quot;Trust&quot; &quot;h_internal&quot; 1.1.1.2 255.255.255.255<br \/>\n    set policy id 14 from &quot;Trust&quot; to &quot;Untrust&quot; &quot;h_internal&quot; &quot;Any&quot; &quot;ICMP-ANY&quot; permit<br \/>\n    SSG20-&gt;<br \/>\n    Now, the address has to be changed from 1.1.1.2 to 1.1.1.100 (in the same entry). So, the mod command can be used:<br \/>\n    SSG20-&gt;mod address &quot;Trust&quot; &quot;h_internal&quot; &quot;h_internal&quot; 1.1.1.100 255.255.255.255 Subsequently, the configuration is changed:<br \/>\n    SSG20-&gt;get conf | i &quot;h_internal&quot;<br \/>\n    set address &quot;Trust&quot; &quot;h_internal&quot; 1.1.1.100 255.255.255.255<br \/>\n    set policy id 14 from &quot;Trust&quot; to &quot;Untrust&quot; &quot;h_internal&quot; &quot;Any&quot; &quot;ICMP-ANY&quot; permit<br \/>\n    nSSG20-&gt;<\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.houquner.com\">Kermit\u7684\u7f51\u7ad9<\/a> &raquo; <a href=\"https:\/\/www.houquner.com\/index.php\/archives\/451\">\u5728ScreenOS\u4e0a\u4f7f\u7528\u4fee\u6539\u547d\u4ee4\u548c\u8fd0\u884c\u811a\u672c<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>How to Run a Script on the Firewall http:\/\/kb.juniper.net\/InfoCenter\/index?page=content&amp;id=KB10219 Here is the procedure: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-451","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/posts\/451"}],"collection":[{"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/comments?post=451"}],"version-history":[{"count":0,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/posts\/451\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/media?parent=451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/categories?post=451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.houquner.com\/index.php\/wp-json\/wp\/v2\/tags?post=451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}