xExekut3x

SRX-config

May 23rd, 2017
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.36 KB | None | 0 0
  1. security {
  2. screen {
  3. ids-option untrust-screen {
  4. ...
  5. }
  6. }
  7. nat {
  8. source {
  9. rule-set trust-to-untrust {
  10. from zone trust;
  11. to zone untrust;
  12. rule source-nat-rule {
  13. match {
  14. source-address 0.0.0.0/0;
  15. }
  16. then {
  17. source-nat {
  18. interface;
  19. }
  20. }
  21. }
  22. }
  23. }
  24. destination {
  25. pool Server2 {
  26. address 10.0.0.19/32;
  27. }
  28. pool Server1 {
  29. address 10.0.0.18/32;
  30. }
  31. rule-set untrust-to-trust {
  32. from zone untrust;
  33. rule server2-external {
  34. match {
  35. destination-address 0.0.0.0/0;
  36. destination-port {
  37. 443;
  38. 55395;
  39. 26833;
  40. }
  41. }
  42. then {
  43. destination-nat {
  44. pool {
  45. Server2;
  46. }
  47. }
  48. }
  49. }
  50. rule server1-external {
  51. match {
  52. destination-address 0.0.0.0/0;
  53. destination-port {
  54. 26733;
  55. }
  56. }
  57. then {
  58. destination-nat {
  59. pool {
  60. Server1;
  61. }
  62. }
  63. }
  64. }
  65. }
  66. }
  67. }
  68. policies {
  69. from-zone trust to-zone trust {
  70. policy trust-to-trust {
  71. match {
  72. source-address any;
  73. destination-address any;
  74. application any;
  75. }
  76. then {
  77. permit;
  78. }
  79. }
  80. }
  81. from-zone trust to-zone untrust {
  82. policy trust-to-untrust {
  83. match {
  84. source-address any;
  85. destination-address any;
  86. application any;
  87. }
  88. then {
  89. permit;
  90. }
  91. }
  92. }
  93. from-zone untrust to-zone trust {
  94. policy external-server2 {
  95. description "SSH Access to Server2";
  96. match {
  97. source-address any;
  98. destination-address Server2;
  99. application SSH-DNAT-SERVER2;
  100. }
  101. then {
  102. permit;
  103. }
  104. }
  105. policy external-server1 {
  106. description "SSH Access to Server1";
  107. match {
  108. source-address any;
  109. destination-address Server1;
  110. application SSH-DNAT-SERVER1;
  111. }
  112. then {
  113. permit;
  114. }
  115. }
  116. }
  117. }
  118. zones {
  119. security-zone trust {
  120. host-inbound-traffic {
  121. system-services {
  122. all;
  123. }
  124. protocols {
  125. all;
  126. }
  127. }
  128. interfaces {
  129. irb.3;
  130. irb.4;
  131. }
  132. }
  133. security-zone untrust {
  134. screen untrust-screen;
  135. interfaces {
  136. irb.2 {
  137. host-inbound-traffic {
  138. system-services {
  139. dhcp;
  140. ssh;
  141. snmp;
  142. ping;
  143. bootp;
  144. ike;
  145. https;
  146. }
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. interfaces {
  154. ge-0/0/0 {
  155. description ISP;
  156. unit 0 {
  157. family ethernet-switching {
  158. interface-mode access;
  159. vlan {
  160. members 2;
  161. }
  162. }
  163. }
  164. }
  165. ge-0/0/1 {
  166. description Server1;
  167. unit 0 {
  168. family ethernet-switching {
  169. interface-mode access;
  170. vlan {
  171. members 3;
  172. }
  173. }
  174. }
  175. }
  176. ge-0/0/2 {
  177. description Server2;
  178. unit 0 {
  179. family ethernet-switching {
  180. interface-mode access;
  181. vlan {
  182. members 3;
  183. }
  184. }
  185. }
  186. }
  187. ge-0/0/3 {
  188. description WiFi;
  189. unit 0 {
  190. family ethernet-switching {
  191. interface-mode access;
  192. vlan {
  193. members 4;
  194. }
  195. }
  196. }
  197. }
  198. ge-0/0/4 {
  199. ....
  200. }
  201. ge-0/0/5 {
  202. ....
  203. }
  204. ge-0/0/6 {
  205. description "Inactive Interface";
  206. disable;
  207. }
  208. ge-0/0/7 {
  209. description "Inactive Interface";
  210. disable;
  211. }
  212. irb {
  213. unit 2 {
  214. description "ISP Network";
  215. family inet {
  216. dhcp-client {
  217. retransmission-attempt 6;
  218. retransmission-interval 5;
  219. update-server;
  220. }
  221. filter {
  222. input External;
  223. }
  224. }
  225. }
  226. unit 3 {
  227. description "Servers Network";
  228. family inet {
  229. no-redirects;
  230. address 10.0.0.17/29;
  231. }
  232. }
  233. unit 4 {
  234. description "DHCP Network";
  235. family inet {
  236. no-redirects;
  237. address 10.0.0.1/28;
  238. }
  239. }
  240. }
  241. }
  242. protocols {
  243. l2-learning {
  244. global-mode switching;
  245. }
  246. }
  247. firewall {
  248. family inet {
  249. filter External {
  250. interface-specific;
  251. term permit-ssh {
  252. from {
  253. source-prefix-list {
  254. Management;
  255. }
  256. protocol tcp;
  257. destination-port ssh;
  258. }
  259. then accept;
  260. }
  261. term deny-ssh {
  262. from {
  263. protocol tcp;
  264. destination-port ssh;
  265. }
  266. then {
  267. discard;
  268. }
  269. }
  270. term permit-snmp {
  271. from {
  272. source-prefix-list {
  273. SNMP;
  274. }
  275. protocol udp;
  276. destination-port snmp;
  277. }
  278. then accept;
  279. }
  280. term deny-snmp {
  281. from {
  282. protocol udp;
  283. destination-port snmp;
  284. }
  285. then {
  286. discard;
  287. }
  288. }
  289. term all-else-accept {
  290. then accept;
  291. }
  292. }
  293. }
  294. }
  295.  
  296. access {
  297. address-assignment {
  298. pool DHCPPool {
  299. family inet {
  300. network 10.0.0.0/28;
  301. dhcp-attributes {
  302. name-server {
  303. 10.0.0.18;
  304. 8.8.8.8
  305. } }
  306. router {
  307. 10.0.0.1;
  308. }
  309. }
  310. excluded-address 10.0.0.2;
  311. excluded-address 10.0.0.1;
  312. }
  313. }
  314. }
  315. }
  316. vlans {
  317. vlan-dhcp {
  318. description "DHCP VLAN";
  319. vlan-id 4;
  320. l3-interface irb.4;
  321. }
  322. vlan-isp {
  323. description "ISP VLAN";
  324. vlan-id 2;
  325. l3-interface irb.2;
  326. }
  327. vlan-servers {
  328. description "Servers VLAN";
  329. vlan-id 3;
  330. l3-interface irb.3;
  331. }
  332. }
Advertisement
Add Comment
Please, Sign In to add comment