Advertisement
hbh7

Dorm Edgerouter

Sep 29th, 2018
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 5.69 KB | None | 0 0
  1. firewall {
  2.     all-ping enable
  3.     broadcast-ping disable
  4.     ipv6-receive-redirects disable
  5.     ipv6-src-route disable
  6.     ip-src-route disable
  7.     log-martians enable
  8.     name WAN_IN {
  9.         default-action drop
  10.         description "WAN to internal"
  11.         rule 10 {
  12.             action accept
  13.             description "Allow established/related"
  14.             state {
  15.                 established enable
  16.                 related enable
  17.             }
  18.         }
  19.         rule 20 {
  20.             action drop
  21.             description "Drop invalid state"
  22.             state {
  23.                 invalid enable
  24.             }
  25.         }
  26.     }
  27.     name WAN_LOCAL {
  28.         default-action drop
  29.         description "WAN to router"
  30.         rule 10 {
  31.             action accept
  32.             description "Allow established/related"
  33.             state {
  34.                 established enable
  35.                 related enable
  36.             }
  37.         }
  38.         rule 20 {
  39.             action drop
  40.             description "Drop invalid state"
  41.             state {
  42.                 invalid enable
  43.             }
  44.         }
  45.         rule 21 {
  46.             action accept
  47.             description "Allow VPN"
  48.             destination {
  49.                 address 10.20.32.0/24
  50.             }
  51.             ipsec {
  52.                 match-ipsec
  53.             }
  54.             log disable
  55.             protocol all
  56.             source {
  57.                 address 10.20.28.0/22
  58.             }
  59.         }
  60.     }
  61.     receive-redirects disable
  62.     send-redirects enable
  63.     source-validation disable
  64.     syn-cookies enable
  65. }
  66. interfaces {
  67.     ethernet eth0 {
  68.         address dhcp
  69.         description Internet
  70.         duplex auto
  71.         firewall {
  72.             in {
  73.                 name WAN_IN
  74.             }
  75.             local {
  76.                 name WAN_LOCAL
  77.             }
  78.         }
  79.         speed auto
  80.     }
  81.     ethernet eth1 {
  82.         description Local
  83.         duplex auto
  84.         speed auto
  85.     }
  86.     ethernet eth2 {
  87.         description Local
  88.         duplex auto
  89.         speed auto
  90.     }
  91.     ethernet eth3 {
  92.         description Local
  93.         duplex auto
  94.         speed auto
  95.     }
  96.     ethernet eth4 {
  97.         description Local
  98.         duplex auto
  99.         speed auto
  100.     }
  101.     loopback lo {
  102.     }
  103.     switch switch0 {
  104.         address 10.20.32.1/24
  105.         description Local
  106.         mtu 1500
  107.         switch-port {
  108.             interface eth1 {
  109.             }
  110.             interface eth2 {
  111.             }
  112.             interface eth3 {
  113.             }
  114.             interface eth4 {
  115.             }
  116.             vlan-aware disable
  117.         }
  118.     }
  119. }
  120. port-forward {
  121.     auto-firewall enable
  122.     hairpin-nat enable
  123.     lan-interface switch0
  124.     wan-interface eth0
  125. }
  126. protocols {
  127.     static {
  128.     }
  129. }
  130. service {
  131.     dhcp-server {
  132.         disabled false
  133.         hostfile-update disable
  134.         shared-network-name LAN {
  135.             authoritative enable
  136.             subnet 10.20.32.0/24 {
  137.                 default-router 10.20.32.1
  138.                 dns-server 10.20.32.1
  139.                 lease 86400
  140.                 start 10.20.32.38 {
  141.                     stop 10.20.32.243
  142.                 }
  143.             }
  144.         }
  145.         static-arp disable
  146.         use-dnsmasq disable
  147.     }
  148.     dns {
  149.         forwarding {
  150.             cache-size 150
  151.             listen-on switch0
  152.         }
  153.     }
  154.     gui {
  155.         http-port 80
  156.         https-port 443
  157.         older-ciphers enable
  158.     }
  159.     nat {
  160.         rule 5010 {
  161.             description "masquerade for WAN"
  162.             outbound-interface eth0
  163.             type masquerade
  164.         }
  165.     }
  166.     ssh {
  167.         port 22
  168.         protocol-version v2
  169.     }
  170.     unms {
  171.         disable
  172.     }
  173. }
  174. system {
  175.     host-name EdgeRouterX
  176.     login {
  177.         user hbh7 {
  178.             authentication {
  179.                 encrypted-password ****************
  180.             }
  181.             level admin
  182.         }
  183.     }
  184.     ntp {
  185.         server 0.ubnt.pool.ntp.org {
  186.         }
  187.         server 1.ubnt.pool.ntp.org {
  188.         }
  189.         server 2.ubnt.pool.ntp.org {
  190.         }
  191.         server 3.ubnt.pool.ntp.org {
  192.         }
  193.     }
  194.     offload {
  195.         hwnat enable
  196.         ipsec enable
  197.     }
  198.     package {
  199.         repository wheezy {
  200.             components "main contrib non-free"
  201.             distribution wheezy
  202.             url http://http.us.debian.org/debian
  203.         }
  204.     }
  205.     syslog {
  206.         global {
  207.             facility all {
  208.                 level notice
  209.             }
  210.             facility protocols {
  211.                 level debug
  212.             }
  213.         }
  214.     }
  215.     time-zone America/New_York
  216.     traffic-analysis {
  217.         dpi enable
  218.         export enable
  219.     }
  220. }
  221. vpn {
  222.     ipsec {
  223.         auto-firewall-nat-exclude enable
  224.         esp-group FOO0 {
  225.             proposal 1 {
  226.                 encryption aes256
  227.                 hash sha1
  228.             }
  229.         }
  230.         ike-group FOO0 {
  231.             proposal 1 {
  232.                 dh-group 14
  233.                 encryption aes256
  234.                 hash sha1
  235.             }
  236.         }
  237.         site-to-site {
  238.             peer 69.(IP) {
  239.                 authentication {
  240.                     mode pre-shared-secret
  241.                     pre-shared-secret ****************
  242.                 }
  243.                 connection-type initiate
  244.                 description "Home Network"
  245.                 ike-group FOO0
  246.                 local-address any
  247.                 tunnel 1 {
  248.                     esp-group FOO0
  249.                     local {
  250.                         prefix 10.20.32.0/24
  251.                     }
  252.                     remote {
  253.                         prefix 10.20.28.0/22
  254.                     }
  255.                 }
  256.             }
  257.         }
  258.     }
  259. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement