{"id":665,"date":"2022-06-22T14:43:47","date_gmt":"2022-06-22T06:43:47","guid":{"rendered":"http:\/\/www.rchen.top\/?p=665"},"modified":"2022-06-22T14:43:51","modified_gmt":"2022-06-22T06:43:51","slug":"juniper%e9%98%b2%e7%81%ab%e5%a2%99srx%e5%9f%ba%e6%9c%ac%e9%85%8d%e7%bd%ae%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.rchen.top\/?p=665","title":{"rendered":"juniper\u9632\u706b\u5899SRX\u57fa\u672c\u914d\u7f6e\u547d\u4ee4"},"content":{"rendered":"<p><b>\/\/\u8bbe\u5907\u767b\u9646<\/b><\/p>\n<p>Console\u53e3(\u901a\u7528\u8d85\u7ea7\u7ec8\u7aef\u7f3a\u7701\u914d\u7f6e)\u8fde\u63a5SRX\uff0croot\u7528\u6237\u767b\u9646\uff0c\u5bc6\u7801\u4e3a\u7a7a&lt;\u521d\u59cb\u7b2c\u4e00\u6b21\u767b\u9646&gt;<\/p>\n<p>login: root<\/p>\n<p>Password:<\/p>\n<p>root% cli\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/***\u8fdb\u5165\u64cd\u4f5c\u6a21\u5f0f***\/<\/p>\n<p>root&gt; configure\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/***\u8fdb\u5165\u914d\u7f6e\u6a21\u5f0f***\/<\/p>\n<p>Root#<\/p>\n<p><b>\/\/\u8bbe\u5907\u6062\u590d\u51fa\u5382\u4ecb\u7ecd<\/b><\/p>\n<p>\u9996\u5148\u6839\u636e\u4e0a\u8ff0\u64cd\u4f5c\u8fdb\u5165\u5230\u914d\u7f6e\u6a21\u5f0f,\u6267\u884c\u4e0b\u5217\u547d\u4ee4\uff1a<\/p>\n<p>root# load factory-default<\/p>\n<p>warning: activating factory configuration \/***\u7cfb\u7edf\u6fc0\u6d3b\u51fa\u5382\u914d\u7f6e***\/<\/p>\n<p>\u6062\u590d\u51fa\u5382\u540e,\u5fc5\u987b\u7acb\u523b\u8bbe\u7f6e ROOT \u5e10\u53f7\u5bc6\u7801&lt;\u9ed8\u8ba4\u5bc6\u7801\u81f3\u5c11 6 \u4f4d\u6570\uff1a\u5b57\u6bcd\u52a0\u6570\u5b57&gt;<\/p>\n<p>root# set system root-authentication plain-text-password<\/p>\n<p>New password:<\/p>\n<p>\u5f53\u8bbe\u7f6e\u5b8c ROOT \u5e10\u53f7\u5bc6\u7801\u4ee5\u540e,\u8fdb\u884c\u4fdd\u5b58\u6fc0\u6d3b\u914d\u7f6e<\/p>\n<p>root# commit<\/p>\n<p>commit complete<\/p>\n<p>\u5728\u6b64\u9700\u8981\u63d0\u9192\u914d\u7f6e\u64cd\u4f5c\u5458\u6ce8\u610f\uff0c\u7cfb\u7edf\u6062\u590d\u51fa\u5382\u540e\u5e76\u4e0d\u4ee3\u8868\u6ca1\u6709\u4efb\u4f55\u914d\u7f6e,\u7cfb\u7edf\u7f3a\u7701\u914d\u7f6e\u6709 Screen\\DHCP\\Policy<\/p>\n<p>\u7b49\u76f8\u5173\u914d\u7f6e,\u4f60\u5982\u679c\u9700\u8981\u5b8c\u6574\u7684\u5220\u9664,\u53ef\u4ee5\u6267\u884c\u547d\u4ee4 delete \u5220\u9664\u76f8\u5173\u914d\u7f6e\u3002\u901a\u8fc7 show \u6765\u67e5\u770b\u7cfb\u7edf\u662f\u5426\u8fd8\u6709\u9057\u7559<\/p>\n<p>\u4e0d\u9700\u8981\u7684\u914d\u7f6e,\u53ef\u4ee5\u4e00\u4e00\u8fdb\u884c\u5220\u9664,\u76f4\u5230\u7b26\u5408\u4f60\u7684\u8981\u6c42,\u7136\u540e\u518d\u91cd\u65b0\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8fdb\u884c\u914d\u7f6e\u3002<\/p>\n<p><b>\/\/\u914d\u7f6eroot\u7528\u6237\u53e3\u4ee4<\/b><\/p>\n<p>root# set system root-authentication plain-text-password<\/p>\n<p>root# new password : chenrui123<\/p>\n<p>root# retype new password: chenrui123<\/p>\n<p><b>\/\/\u914d\u7f6e\u8fdc\u7a0b\u767b\u5f55<\/b><\/p>\n<p>root# set system login user chenrui class super-user authentication plain-text-password<\/p>\n<p>root# new password : 1qaz@WSX<\/p>\n<p>root# retype new password: 1qaz@WSX<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p><b>\/\/\u5176\u4ed6<\/b><\/p>\n<p>set system time-zone Asia\/Shanghai\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u8bbe\u7f6e\u65f6\u533a<\/p>\n<p>run set date 201610100906.59\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u8bbe\u7f6e\u65f6\u95f4<\/p>\n<p>root#set system host-name SRX-650-1\u00a0\u00a0\u00a0 \/***\u8bbe\u7f6e\u4e3b\u673a\u540d***\/<\/p>\n<p>root#set system name-server 8.8.8.8\u00a0\u00a0\u00a0\u00a0 \/***\u8bbe\u7f6e DNS \u670d\u52a1\u5668***\/<\/p>\n<p>root#set system services telnet\u00a0\u00a0\u00a0 \/***\u5728\u7cfb\u7edf\u7ea7\u5f00\u542ftelnet\u8fdc\u7a0b\u63a5\u5165\u7ba1\u7406\u670d\u52a1***\/<\/p>\n<p><b>\/\/\u7aef\u53e3\u914d\u7f6eIP<\/b><\/p>\n<p>set interfaces ge-0\/0\/0.0 family inet address 10.1.1.1\/24<\/p>\n<p>set interfaces ge-0\/0\/0 unit 0 family inet address 10.1.1.1\/24<\/p>\n<p>set interfaces lo0 unit 0 family inet address 192.168.100.1\/24<\/p>\n<p><b>\/***\u914d\u7f6e\u903b\u8f91\u63a5\u53e3\u5730\u5740\u53ca\u7f3a\u7701\u8def\u7531\uff0cSRX \u63a5\u53e3\u8981\u6c42 IP \u5730\u5740\u5fc5\u987b\u914d\u7f6e\u5728\u903b\u8f91\u63a5\u53e3\u4e0b\uff08\u7c7b\u4f3c ScreenOS \u7684\u5b50\u63a5\u53e3\uff09\uff0c<\/b><\/p>\n<p>\u901a\u5e38\u4f7f\u7528\u903b\u8f91\u63a5\u53e3 0 \u5373\u53ef***\/<\/p>\n<p>set routing-options static route 192.168.200\/0 next-hop 1.1.1.2<\/p>\n<p>\/***\u5c06 ge-0\/0\/0.0 \u63a5\u53e3\u653e\u5230\u5b89\u5168\u533a\u57df\u4e2d***\/<\/p>\n<p>set security zones security-zone trust interfaces ge-0\/0\/0.0<\/p>\n<p>\/***\u5728 untrust zone \u6253\u5f00\u5141\u8bb8\u8fdc\u7a0b\u767b\u9646\u7ba1\u7406\u670d\u52a1,SRX \u8981\u6c42\u57fa\u4e8e Zone \u5f00\u653e\uff0c\u4ece SRX \u4e3b\u52a8\u8bbf\u95ee\u51fa\u53bb\u6d41\u91cf\u5f00\u542f\u670d\u52a1***\/<\/p>\n<p>set security zones security-zone trust host-inbound-traffic system-services ping<\/p>\n<p>set security zones security-zone trust host-inbound-traffic system-services http<\/p>\n<p>set security zones security-zone trust host-inbound-traffic system-services telnet<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p><b>\/\/\u7b56\u7565\u5730\u5740\u5bf9\u8c61\u5b9a\u4e49<\/b><\/p>\n<p>SRX \u670d\u52a1\u7f51\u5173\u5730\u5740\u5bf9\u8c61\u9700\u8981\u81ea\u5b9a\u4e49\u540e\u624d\u53ef\u4ee5\u5728\u7b56\u7565\u4e2d\u8fdb\u884c\u5f15\u7528,\u9ed8\u8ba4\u53ea\u6709 any \u5bf9\u8c61<\/p>\n<p>\u81ea\u5b9a\u4e49\u5355\u4e2a\u5730\u5740\u5bf9\u8c61\u5982\u4e0b\uff1a<\/p>\n<p>root# set security zones security-zone trust address-book address pc-1 20.1.1.200\/32<\/p>\n<p>root# set security zones security-zone trust address-book address pc-2 20.1.1.210\/32<\/p>\n<p>\u81ea\u5b9a\u4e49\u5355\u4e2a\u5730\u5740\u7ec4\u5bf9\u8c61\u5982\u4e0b\uff1a<\/p>\n<p>root# set security zones security-zone trust address-book address-set pc-group address pc-1<\/p>\n<p>root# set security zones security-zone trust address-book address-set pc-group address pc-2<\/p>\n<p><b>\/\/\u7b56\u7565\u670d\u52a1\u5bf9\u8c61\u5b9a\u4e49<\/b><\/p>\n<p>SRX \u670d\u52a1\u7f51\u5173\u90e8\u5206\u670d\u52a1\u5bf9\u8c61\u9700\u8981\u81ea\u5b9a\u4e49\u540e\u624d\u53ef\u4ee5\u5728\u7b56\u7565\u4e2d\u8fdb\u884c\u5f15\u7528,\u9ed8\u8ba4\u4ec5\u6709\u9884\u5b9a\u4e49\u5e38\u7528\u670d\u52a1\u5bf9\u8c61<\/p>\n<p>\u81ea\u5b9a\u4e49\u5355\u4e2a\u670d\u52a1\u5bf9\u8c61\u5982\u4e0b\uff1a<\/p>\n<p>set applications application tcp-3389 protocol tcp \u5b9a\u4e49\u670d\u52a1\u5bf9\u8c61\u534f\u8bae&lt;TCP\\UDP\\ICMP\\OTHER&gt;<\/p>\n<p>set applications application tcp-3389 source-port 1-65535 \u5b9a\u4e49\u670d\u52a1\u5bf9\u8c61\u6e90\u7aef\u53e3<\/p>\n<p>set applications application tcp-3389 destination-port 3389-3389 \u5b9a\u4e49\u670d\u52a1\u5bf9\u8c61\u76ee\u6807\u5730\u5740<\/p>\n<p>set applications application tcp-3389 inactivity-timeout never \u53ef\u9009\u5b9a\u4e49\u670d\u52a1\u5bf9\u8c61 timeout \u65f6\u957f<\/p>\n<p>set applications application tcp-8080 protocol tcp<\/p>\n<p>set applications application tcp-8080 source-port 1-65535<\/p>\n<p>set applications application tcp-8080 destination-port 8080-8080<\/p>\n<p>set applications application tcp-8080 inactivity-timeout 3600<\/p>\n<p><b>\/\/\u81ea\u5b9a\u4e49\u5355\u4e2a\u670d\u52a1\u7ec4\u5bf9\u8c61\u5982\u4e0b\uff1a<\/b><\/p>\n<p>set applications application-set aaplications-group application tcp-8080<\/p>\n<p>set applications application-set aaplications-group application tcp-3389<\/p>\n<p><b>\/\/\u7b56\u7565\u65f6\u95f4\u8c03\u5ea6\u5bf9\u8c61\u5b9a\u4e49<\/b><\/p>\n<p>SRX \u670d\u52a1\u7f51\u5173\u65f6\u95f4\u8c03\u5ea6\u5bf9\u8c61\u9700\u8981\u81ea\u5b9a\u4e49\u540e\u624d\u53ef\u4ee5\u5728\u7b56\u7565\u4e2d\u8fdb\u884c\u5f15\u7528,\u9ed8\u8ba4\u6ca1\u6709\u9884\u5b9a\u4e49\u65f6\u95f4\u8c03\u5ea6\u5bf9\u8c61<\/p>\n<p>\u81ea\u5b9a\u4e49\u5355\u4e2a\u65f6\u95f4\u8c03\u5ea6\u5bf9\u8c61\u5982\u4e0b\uff1a<\/p>\n<p>set schedulers scheduler work-time daily start-time 09:00:00 stop-time 18:00:00<\/p>\n<p>set schedulers scheduler happy-time sunday start-time 00:00:00 stop-time 23:59:59<\/p>\n<p>set schedulers scheduler happy-time saturday start-time 00:00:00 stop-time 23:59:59<\/p>\n<p><b>\/\/\u914d\u7f6e\u57df\u95f4\u7b56\u7565<\/b><\/p>\n<p>set security policies from-zone trust to-zone untrust policy 1 match source-address any<\/p>\n<p>set security policies from-zone trust to-zone untrust policy 1 match destination-address any<\/p>\n<p>set security policies from-zone trust to-zone untrust policy 1 match application any<\/p>\n<p>set security policies from-zone trust to-zone untrust policy 1 then permit<\/p>\n<p>set security policies from-zone untrust to-zone trust policy 1 match source-address any<\/p>\n<p>set security policies from-zone untrust to-zone trust policy 1 match destination-address any<\/p>\n<p>set security policies from-zone untrust to-zone trust policy 1 match application any<\/p>\n<p>set security policies from-zone untrust to-zone trust policy 1 then permit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/\u8bbe\u5907\u767b\u9646 Console\u53e3(\u901a\u7528\u8d85\u7ea7\u7ec8\u7aef\u7f3a\u7701\u914d\u7f6e)\u8fde\u63a5SRX\uff0croot\u7528\u6237\u767b\u9646\uff0c\u5bc6\u7801\u4e3a\u7a7a&lt;\u521d\u59cb\u7b2c\u4e00\u6b21 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":666,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[118,16],"class_list":["post-665","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-01-","tag-juniper","tag-16"],"_links":{"self":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=665"}],"version-history":[{"count":1,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/665\/revisions"}],"predecessor-version":[{"id":667,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/665\/revisions\/667"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/media\/666"}],"wp:attachment":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}