Advertisement
demoss

cfg_wan

Mar 21st, 2013
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 13.28 KB | None | 0 0
  1. ## Last changed: 2013-03-26 12:53:33 GMT+4
  2. version 11.2R4.3;
  3. system {
  4.     host-name godnet;
  5.     time-zone GMT+4;
  6.     root-authentication {
  7.         encrypted-password "$1$VefloaO/$sKiqNrllv5T5n6e.TdXMT0"; ## SECRET-DATA
  8.     }
  9.     name-server {
  10.         10.0.10.254;
  11.         10.0.1.254;
  12.         8.8.8.8;
  13.         8.8.4.4;
  14.     }
  15.     services {
  16.         ssh;
  17.         telnet;
  18.         xnm-clear-text;
  19.         web-management {
  20.             http {
  21.                 interface [ vlan.0 vlan.1 vlan.2 vlan.3 ];
  22.             }
  23.             https {
  24.                 system-generated-certificate;
  25.                 interface [ vlan.0 ge-0/0/0.0 ge-0/0/15.0 ge-0/0/1.0 vlan.3 vlan.2 vlan.1 ];
  26.             }
  27.         }
  28.         dhcp {
  29.             pool 192.168.1.0/24 {
  30.                 address-range low 192.168.1.2 high 192.168.1.254;
  31.                 router {
  32.                     192.168.1.1;
  33.                 }
  34.                 propagate-settings vlan.0;
  35.             }
  36.             pool 192.168.11.0/24 {
  37.                 address-range low 192.168.11.1 high 192.168.11.253;
  38.                 maximum-lease-time 86400;
  39.                 default-lease-time 86400;
  40.                 router {
  41.                     192.168.11.254;
  42.                 }
  43.                 propagate-settings vlan.1;
  44.             }
  45.             pool 192.168.22.0/24 {
  46.                 address-range low 192.168.22.1 high 192.168.22.253;
  47.                 maximum-lease-time 86400;
  48.                 router {
  49.                     192.168.22.254;
  50.                 }
  51.                 propagate-settings vlan.2;
  52.             }
  53.             pool 192.168.33.0/24 {
  54.                 address-range low 192.168.33.1 high 192.168.33.253;
  55.                 maximum-lease-time 86400;
  56.                 domain-name cbuh.karelia.pro;
  57.                 router {
  58.                     192.168.33.254;
  59.                 }
  60.                 propagate-settings vlan.3;
  61.             }
  62.         }
  63.     }
  64.     syslog {
  65.         archive size 100k files 3;
  66.         user * {
  67.             any emergency;
  68.         }
  69.         file messages {
  70.             any critical;
  71.             authorization info;
  72.         }
  73.         file interactive-commands {
  74.             interactive-commands error;
  75.         }
  76.     }
  77.     max-configurations-on-flash 5;
  78.     max-configuration-rollbacks 5;
  79.     license {
  80.         autoupdate {
  81.             url https://ae1.juniper.net/junos/key_retrieval;
  82.         }
  83.     }
  84. }
  85. interfaces {
  86.     ge-0/0/0 {
  87.         unit 0 {
  88.             family inet {
  89.                 address 178.19.246.156/29;
  90.             }
  91.         }
  92.     }
  93.     ge-0/0/1 {
  94.         unit 0 {
  95.             family inet {
  96.                 address 178.19.242.225/29;
  97.             }
  98.         }
  99.     }
  100.     ge-0/0/2 {
  101.         unit 0 {
  102.             family ethernet-switching {
  103.                 vlan {
  104.                     members vlan-trust;
  105.                 }
  106.             }
  107.         }
  108.     }
  109.     ge-0/0/3 {
  110.         unit 0 {
  111.             family ethernet-switching {
  112.                 vlan {
  113.                     members vlan-trust;
  114.                 }
  115.             }
  116.         }
  117.     }
  118.     ge-0/0/4 {
  119.         unit 0 {
  120.             family ethernet-switching {
  121.                 vlan {
  122.                     members server;
  123.                 }
  124.             }
  125.         }
  126.     }
  127.     ge-0/0/5 {
  128.         unit 0 {
  129.             family ethernet-switching {
  130.                 vlan {
  131.                     members minedu;
  132.                 }
  133.             }
  134.         }
  135.     }
  136.     ge-0/0/6 {
  137.         unit 0 {
  138.             family ethernet-switching {
  139.                 vlan {
  140.                     members cbedu;
  141.                 }
  142.             }
  143.         }
  144.     }
  145.     ge-0/0/7 {
  146.         unit 0 {
  147.             family ethernet-switching {
  148.                 vlan {
  149.                     members vlan-trust;
  150.                 }
  151.             }
  152.         }
  153.     }
  154.     ge-0/0/8 {
  155.         unit 0 {
  156.             family ethernet-switching {
  157.                 vlan {
  158.                     members vlan-trust;
  159.                 }
  160.             }
  161.         }
  162.     }
  163.     ge-0/0/9 {
  164.         unit 0 {
  165.             family ethernet-switching {
  166.                 vlan {
  167.                     members vlan-trust;
  168.                 }
  169.             }
  170.         }
  171.     }
  172.     ge-0/0/10 {
  173.         unit 0 {
  174.             family ethernet-switching {
  175.                 vlan {
  176.                     members vlan-trust;
  177.                 }
  178.             }
  179.         }
  180.     }
  181.     ge-0/0/11 {
  182.         unit 0 {
  183.             family ethernet-switching {
  184.                 vlan {
  185.                     members vlan-trust;
  186.                 }
  187.             }
  188.         }
  189.     }
  190.     ge-0/0/12 {
  191.         unit 0 {
  192.             family ethernet-switching {
  193.                 vlan {
  194.                     members vlan-trust;
  195.                 }
  196.             }
  197.         }
  198.     }
  199.     ge-0/0/13 {
  200.         unit 0 {
  201.             family ethernet-switching {
  202.                 vlan {
  203.                     members vlan-trust;
  204.                 }
  205.             }
  206.         }
  207.     }
  208.     ge-0/0/14 {
  209.         unit 0 {
  210.             family ethernet-switching {
  211.                 vlan {
  212.                     members vlan-trust;
  213.                 }
  214.             }
  215.         }
  216.     }
  217.     ge-0/0/15 {
  218.         unit 0 {
  219.             family inet {
  220.                 address 192.168.26.237/24;
  221.             }
  222.         }
  223.     }
  224.     vlan {
  225.         unit 0 {
  226.             family inet {
  227.                 address 192.168.1.1/24;
  228.             }
  229.         }
  230.         unit 1 {
  231.             family inet {
  232.                 address 192.168.11.254/24;
  233.             }
  234.         }
  235.         unit 2 {
  236.             family inet {
  237.                 address 192.168.22.254/24;
  238.             }
  239.         }
  240.         unit 3 {
  241.             family inet {
  242.                 address 192.168.33.254/24;
  243.             }
  244.         }
  245.     }
  246. }
  247. routing-options {
  248.     static {
  249.         route 0.0.0.0/0 next-hop 178.19.246.158;
  250.         route 192.168.26.0/24 next-hop 192.168.11.254;
  251.     }
  252. }
  253. protocols {
  254.     stp;
  255. }
  256. security {
  257.     flow {
  258.         allow-dns-reply;
  259.     }
  260.     screen {
  261.         ids-option untrust-screen {
  262.             icmp {
  263.                 ping-death;
  264.             }
  265.             ip {
  266.                 source-route-option;
  267.                 tear-drop;
  268.             }
  269.             tcp {
  270.                 syn-flood {
  271.                     alarm-threshold 1024;
  272.                     attack-threshold 200;
  273.                     source-threshold 1024;
  274.                     destination-threshold 2048;
  275.                     timeout 20;
  276.                 }
  277.                 land;
  278.             }
  279.         }
  280.     }
  281.     nat {
  282.         source {
  283.             pool snat-pool1 {
  284.                 address {
  285.                     178.19.246.153/32 to 178.19.246.156/32;
  286.                 }
  287.             }
  288.             pool snat-pool2 {
  289.                 address {
  290.                     217.77.50.129/32 to 217.77.50.131/32;
  291.                 }
  292.             }
  293.             rule-set trust-to-untrust {
  294.                 from zone trust;
  295.                 to zone untrust;
  296.                 rule source-nat-rule {
  297.                     match {
  298.                         source-address 0.0.0.0/0;
  299.                     }
  300.                     then {
  301.                         source-nat {
  302.                             pool {
  303.                                 snat-pool1;
  304.                             }
  305.                         }
  306.                     }
  307.                 }
  308.             }
  309.             rule-set srv-untrast {
  310.                 from zone server;
  311.                 to zone untrust;
  312.                 rule srv-pool2 {
  313.                     match {
  314.                         source-address 192.168.11.0/24;
  315.                         destination-address 0.0.0.0/0;
  316.                     }
  317.                     then {
  318.                         source-nat {
  319.                             pool {
  320.                                 snat-pool1;
  321.                             }
  322.                         }
  323.                     }
  324.                 }
  325.             }
  326.             rule-set srv-trust {
  327.                 from zone server;
  328.                 to interface ge-0/0/15.0;
  329.                 rule srv-trust {
  330.                     match {
  331.                         source-address 192.168.11.0/24;
  332.                         destination-address 192.168.26.0/24;
  333.                     }
  334.                     then {
  335.                         source-nat {
  336.                             interface;
  337.                         }
  338.                     }
  339.                 }
  340.             }
  341.         }
  342.         proxy-arp {
  343.             interface ge-0/0/0.0 {
  344.                 address {
  345.                     178.19.246.154/32 to 178.19.246.156/32;
  346.                 }
  347.             }
  348.         }
  349.     }
  350.     policies {
  351.         from-zone trust to-zone untrust {
  352.             policy trust-to-untrust {
  353.                 match {
  354.                     source-address any;
  355.                     destination-address any;
  356.                     application any;
  357.                 }
  358.                 then {
  359.                     permit;
  360.                 }
  361.             }
  362.         }
  363.         from-zone server to-zone untrust {
  364.             policy srv-untrast {
  365.                 match {
  366.                     source-address srv-net;
  367.                     destination-address any;
  368.                     application any;
  369.                 }
  370.                 then {
  371.                     permit;
  372.                 }
  373.             }
  374.         }
  375.         from-zone minedu to-zone untrust {
  376.             policy min-untrast {
  377.                 match {
  378.                     source-address min-net;
  379.                     destination-address any;
  380.                     application any;
  381.                 }
  382.                 then {
  383.                     permit;
  384.                 }
  385.             }
  386.         }
  387.         from-zone edubuh to-zone untrust {
  388.             policy buh-untrast {
  389.                 match {
  390.                     source-address buh-net;
  391.                     destination-address any;
  392.                     application any;
  393.                 }
  394.                 then {
  395.                     permit;
  396.                 }
  397.             }
  398.         }
  399.         from-zone server to-zone trust {
  400.             policy srv-trust {
  401.                 match {
  402.                     source-address any;
  403.                     destination-address old-net;
  404.                     application any;
  405.                 }
  406.                 then {
  407.                     permit;
  408.                 }
  409.             }
  410.         }
  411.     }
  412.     zones {
  413.         security-zone trust {
  414.             address-book {
  415.                 address old-net 192.168.26.0/24;
  416.             }
  417.             host-inbound-traffic {
  418.                 system-services {
  419.                     all;
  420.                 }
  421.                 protocols {
  422.                     all;
  423.                 }
  424.             }
  425.             interfaces {
  426.                 vlan.0;
  427.                 ge-0/0/15.0;
  428.             }
  429.         }
  430.         security-zone untrust {
  431.             screen untrust-screen;
  432.             interfaces {
  433.                 ge-0/0/0.0 {
  434.                     host-inbound-traffic {
  435.                         system-services {
  436.                             tftp;
  437.                             http;
  438.                             ping;
  439.                             ssh;
  440.                         }
  441.                         protocols {
  442.                             bgp;
  443.                             ospf;
  444.                             rip;
  445.                         }
  446.                     }
  447.                 }
  448.                 ge-0/0/1.0 {
  449.                     host-inbound-traffic {
  450.                         system-services {
  451.                             tftp;
  452.                             http;
  453.                             ping;
  454.                             ssh;
  455.                         }
  456.                         protocols {
  457.                             bgp;
  458.                             ospf;
  459.                             rip;
  460.                         }
  461.                     }
  462.                 }
  463.             }
  464.         }
  465.         security-zone server {
  466.             address-book {
  467.                 address srv-net 192.168.11.0/24;
  468.             }
  469.             host-inbound-traffic {
  470.                 system-services {
  471.                     all;
  472.                 }
  473.                 protocols {
  474.                     all;
  475.                 }
  476.             }
  477.             interfaces {
  478.                 vlan.1;
  479.             }
  480.         }
  481.         security-zone minedu {
  482.             address-book {
  483.                 address min-net 192.168.22.0/24;
  484.             }
  485.             host-inbound-traffic {
  486.                 system-services {
  487.                     all;
  488.                 }
  489.                 protocols {
  490.                     all;
  491.                 }
  492.             }
  493.             interfaces {
  494.                 vlan.2;
  495.             }
  496.         }
  497.         security-zone edubuh {
  498.             address-book {
  499.                 address buh-net 192.168.33.0/24;
  500.             }
  501.             host-inbound-traffic {
  502.                 system-services {
  503.                     all;
  504.                 }
  505.                 protocols {
  506.                     all;
  507.                 }
  508.             }
  509.             interfaces {
  510.                 vlan.3;
  511.             }
  512.         }
  513.     }
  514. }
  515. vlans {
  516.     cbedu {
  517.         vlan-id 33;
  518.         l3-interface vlan.3;
  519.     }
  520.     minedu {
  521.         vlan-id 22;
  522.         l3-interface vlan.2;
  523.     }
  524.     server {
  525.         vlan-id 11;
  526.         l3-interface vlan.1;
  527.     }
  528.     vlan-trust {
  529.         vlan-id 3;
  530.         l3-interface vlan.0;
  531.     }
  532. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement