Advertisement
Guest User

setup ubnt

a guest
Aug 8th, 2016
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.77 KB | None | 0 0
  1. ubnt@ubnt:~$ show configuration | no-more
  2. firewall {
  3. all-ping enable
  4. broadcast-ping disable
  5. group {
  6. network-group PRIVATE_NETS {
  7. network 192.168.0.0/16
  8. network 172.16.0.0/12
  9. network 10.0.0.0/8
  10. }
  11. }
  12. ipv6-receive-redirects disable
  13. ipv6-src-route disable
  14. ip-src-route disable
  15. log-martians disable
  16. modify balance {
  17. rule 10 {
  18. action modify
  19. description "do NOT load balance lan to lan"
  20. destination {
  21. group {
  22. network-group PRIVATE_NETS
  23. }
  24. }
  25. modify {
  26. table main
  27. }
  28. }
  29. rule 20 {
  30. action modify
  31. description "do NOT load balance destination public address"
  32. destination {
  33. group {
  34. address-group ADDRv4_eth0
  35. }
  36. }
  37. modify {
  38. table main
  39. }
  40. }
  41. rule 30 {
  42. action modify
  43. description "do NOT load balance destination public address"
  44. destination {
  45. group {
  46. address-group ADDRv4_eth1
  47. }
  48. }
  49. modify {
  50. table main
  51. }
  52. }
  53. rule 70 {
  54. action modify
  55. modify {
  56. lb-group G
  57. }
  58. }
  59. }
  60. name WAN_IN {
  61. default-action drop
  62. description "WAN to internal"
  63. rule 10 {
  64. action accept
  65. description "Allow established/related"
  66. state {
  67. established enable
  68. related enable
  69. }
  70. }
  71. rule 20 {
  72. action drop
  73. description "Drop invalid state"
  74. state {
  75. invalid enable
  76. }
  77. }
  78. }
  79. name WAN_LOCAL {
  80. default-action drop
  81. description "WAN to router"
  82. rule 10 {
  83. action accept
  84. description "Allow established/related"
  85. state {
  86. established enable
  87. related enable
  88. }
  89. }
  90. rule 20 {
  91. action drop
  92. description "Drop invalid state"
  93. state {
  94. invalid enable
  95. }
  96. }
  97. }
  98. receive-redirects disable
  99. send-redirects enable
  100. source-validation disable
  101. syn-cookies enable
  102. }
  103. interfaces {
  104. ethernet eth0 {
  105. address dhcp
  106. description WAN
  107. duplex auto
  108. firewall {
  109. in {
  110. name WAN_IN
  111. }
  112. local {
  113. name WAN_LOCAL
  114. }
  115. }
  116. speed auto
  117. }
  118. ethernet eth1 {
  119. address dhcp
  120. description "WAN 2"
  121. duplex auto
  122. firewall {
  123. in {
  124. name WAN_IN
  125. }
  126. local {
  127. name WAN_LOCAL
  128. }
  129. }
  130. speed auto
  131. }
  132. ethernet eth2 {
  133. duplex auto
  134. speed auto
  135. }
  136. ethernet eth3 {
  137. duplex auto
  138. speed auto
  139. }
  140. ethernet eth4 {
  141. duplex auto
  142. speed auto
  143. }
  144. loopback lo {
  145. }
  146. switch switch0 {
  147. address 10.100.10.1/24
  148. description Local
  149. firewall {
  150. in {
  151. modify balance
  152. }
  153. }
  154. mtu 1500
  155. switch-port {
  156. interface eth2 {
  157. }
  158. interface eth3 {
  159. }
  160. interface eth4 {
  161. }
  162. vlan-aware disable
  163. }
  164. }
  165. }
  166. load-balance {
  167. group G {
  168. interface eth0 {
  169. }
  170. interface eth1 {
  171. }
  172. sticky {
  173. dest-addr enable
  174. }
  175. }
  176. }
  177. service {
  178. dhcp-server {
  179. disabled false
  180. hostfile-update disable
  181. shared-network-name LAN {
  182. authoritative enable
  183. subnet 10.100.10.0/24 {
  184. default-router 10.100.10.1
  185. dns-server 10.100.10.1
  186. dns-server 8.8.4.4
  187. lease 86400
  188. start 10.100.10.38 {
  189. stop 10.100.10.243
  190. }
  191. static-mapping UBNT_SWITCH {
  192. ip-address 10.100.10.2
  193. mac-address 44:d9:e7:93:36:3c
  194. }
  195. }
  196. }
  197. }
  198. dns {
  199. forwarding {
  200. cache-size 150
  201. listen-on switch0
  202. }
  203. }
  204. gui {
  205. http-port 80
  206. https-port 443
  207. older-ciphers enable
  208. }
  209. nat {
  210. rule 5000 {
  211. description "masquerade for WAN"
  212. outbound-interface eth0
  213. type masquerade
  214. }
  215. rule 5002 {
  216. description "masquerade for WAN 2"
  217. outbound-interface eth1
  218. type masquerade
  219. }
  220. }
  221. ssh {
  222. port 22
  223. protocol-version v2
  224. }
  225. }
  226. system {
  227. conntrack {
  228. expect-table-size 4096
  229. hash-size 4096
  230. table-size 32768
  231. tcp {
  232. half-open-connections 512
  233. loose enable
  234. max-retrans 3
  235. }
  236. }
  237. host-name ubnt
  238. login {
  239. user ubnt {
  240. authentication {
  241. encrypted-password ****************
  242. }
  243. level admin
  244. }
  245. }
  246. name-server 8.8.8.8
  247. name-server 8.8.4.4
  248. ntp {
  249. server 0.ubnt.pool.ntp.org {
  250. }
  251. server 1.ubnt.pool.ntp.org {
  252. }
  253. server 2.ubnt.pool.ntp.org {
  254. }
  255. server 3.ubnt.pool.ntp.org {
  256. }
  257. }
  258. syslog {
  259. global {
  260. facility all {
  261. level notice
  262. }
  263. facility protocols {
  264. level debug
  265. }
  266. }
  267. }
  268. time-zone Europe/Berlin
  269. traffic-analysis {
  270. dpi enable
  271. export enable
  272. }
  273. }
  274. ubnt@u
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement