Advertisement
hbh7

Home Edgerouter

Sep 29th, 2018
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 7.25 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 Ping"
  48.             destination {
  49.                 group {
  50.                     address-group ADDRv4_eth0
  51.                 }
  52.             }
  53.             icmp {
  54.                 type 8
  55.             }
  56.             log disable
  57.             protocol icmp
  58.         }
  59.         rule 30 {
  60.             action accept
  61.             description openvpn
  62.             destination {
  63.                 port 1194
  64.             }
  65.             protocol udp
  66.         }
  67.         rule 31 {
  68.             action accept
  69.             description "Allow VPN"
  70.             destination {
  71.                 address 10.20.28.0/22
  72.             }
  73.             ipsec {
  74.                 match-ipsec
  75.             }
  76.             log disable
  77.             protocol all
  78.             source {
  79.                 address 10.20.32.0/24
  80.             }
  81.         }
  82.     }
  83.     receive-redirects disable
  84.     send-redirects enable
  85.     source-validation disable
  86.     syn-cookies enable
  87. }
  88. interfaces {
  89.     ethernet eth0 {
  90.         address dhcp
  91.         address dhcpv6
  92.         description Internet
  93.         duplex auto
  94.         firewall {
  95.             in {
  96.                 name WAN_IN
  97.             }
  98.             local {
  99.                 name WAN_LOCAL
  100.             }
  101.         }
  102.         speed auto
  103.     }
  104.     ethernet eth1 {
  105.         address 10.20.30.1/22
  106.         address 10.20.30.40/22
  107.         address 10.20.28.1/22
  108.         description LAN
  109.         dhcp-options {
  110.             default-route update
  111.             default-route-distance 210
  112.             name-server update
  113.         }
  114.         duplex auto
  115.         speed auto
  116.     }
  117.     ethernet eth2 {
  118.         description Local
  119.         duplex auto
  120.         speed auto
  121.     }
  122.     loopback lo {
  123.     }
  124. }
  125. port-forward {
  126.     auto-firewall enable
  127.     hairpin-nat enable
  128.     lan-interface eth1
  129.         (various service rules)
  130.     wan-interface eth0
  131. }
  132. protocols {
  133.     static {
  134.     }
  135. }
  136. service {
  137.     dhcp-server {
  138.         disabled false
  139.         hostfile-update enable
  140.         shared-network-name LAN {
  141.             authoritative enable
  142.             subnet 10.20.28.0/22 {
  143.                 default-router 10.20.30.40
  144.                 dns-server 8.8.8.8
  145.                 dns-server 8.8.4.4
  146.                 domain-name mydomain.com
  147.                 lease 600
  148.                 start 10.20.30.100 {
  149.                     stop 10.20.30.200
  150.                 }
  151.                 (static mappings)
  152.                 unifi-controller 10.20.31.113
  153.             }
  154.         }
  155.         static-arp disable
  156.         use-dnsmasq disable
  157.     }
  158.     dns {
  159.         forwarding {
  160.             cache-size 150
  161.             listen-on eth1
  162.             listen-on vtun0
  163.         }
  164.     }
  165.     gui {
  166.         http-port 80
  167.         https-port 443
  168.         older-ciphers enable
  169.     }
  170.     nat {
  171.         rule 5010 {
  172.             description "masquerade for WAN"
  173.             outbound-interface eth0
  174.             type masquerade
  175.         }
  176.     }
  177.     snmp {
  178.         community public {
  179.             authorization ro
  180.         }
  181.     }
  182.     ssh {
  183.         port 22
  184.         protocol-version v2
  185.     }
  186.     (unms thing)
  187.     upnp {
  188.         listen-on eth1 {
  189.             outbound-interface eth0
  190.         }
  191.     }
  192. }
  193. system {
  194.     config-management {
  195.         commit-revisions 10
  196.     }
  197.     conntrack {
  198.         expect-table-size 65536
  199.         hash-size 65536
  200.         table-size 524288
  201.     }
  202.     host-name EdgeRouterLite
  203.     login {
  204.         user hbh7 {
  205.             authentication {
  206.                 encrypted-password ****************
  207.                 plaintext-password ****************
  208.                 public-keys rsa-key-20160821 {
  209.                     key ****************
  210.                     type ssh-rsa
  211.                 }
  212.             }
  213.             full-name "hbh7"
  214.             level admin
  215.         }
  216.     }
  217.     ntp {
  218.         server 0.ubnt.pool.ntp.org {
  219.         }
  220.         server 1.ubnt.pool.ntp.org {
  221.         }
  222.         server 2.ubnt.pool.ntp.org {
  223.         }
  224.         server 3.ubnt.pool.ntp.org {
  225.         }
  226.     }
  227.     offload {
  228.         hwnat disable
  229.         ipsec enable
  230.         ipv4 {
  231.             forwarding enable
  232.             gre enable
  233.             pppoe enable
  234.             vlan enable
  235.         }
  236.         ipv6 {
  237.             forwarding enable
  238.             pppoe disable
  239.             vlan enable
  240.         }
  241.     }
  242.     package {
  243.         repository wheezy {
  244.             components "main contrib non-free"
  245.             distribution wheezy
  246.             password ****************
  247.             url http://http.us.debian.org/debian
  248.             username ""
  249.         }
  250.     }
  251.     static-host-mapping {
  252.         host-name router {
  253.             inet 1.1.1.1
  254.         }
  255.     }
  256.     syslog {
  257.         global {
  258.             facility all {
  259.                 level notice
  260.             }
  261.             facility protocols {
  262.                 level debug
  263.             }
  264.         }
  265.     }
  266.     time-zone America/New_York
  267.     traffic-analysis {
  268.         custom-category Games {
  269.             name "Valve Steam"
  270.         }
  271.         custom-category Web {
  272.             name SSL/TLS
  273.             name QUIC
  274.         }
  275.         dpi enable
  276.         export enable
  277.     }
  278. }
  279. traffic-control {
  280. }
  281. vpn {
  282.     ipsec {
  283.         auto-firewall-nat-exclude enable
  284.         esp-group FOO0 {
  285.             proposal 1 {
  286.                 encryption aes256
  287.                 hash sha1
  288.             }
  289.         }
  290.         ike-group FOO0 {
  291.             proposal 1 {
  292.                 dh-group 14
  293.                 encryption aes256
  294.                 hash sha1
  295.             }
  296.         }
  297.         site-to-site {
  298.             peer 128.(IP) {
  299.                 authentication {
  300.                     mode pre-shared-secret
  301.                     pre-shared-secret ****************
  302.                 }
  303.                 connection-type respond
  304.                 description "Dorm Network"
  305.                 ike-group FOO0
  306.                 local-address any
  307.                 tunnel 1 {
  308.                     esp-group FOO0
  309.                     local {
  310.                         prefix 10.20.28.0/22
  311.                     }
  312.                     remote {
  313.                         prefix 10.20.32.0/24
  314.                     }
  315.                 }
  316.             }
  317.         }
  318.     }
  319. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement