version 15.1X49-D60.7; system { host-name SRX320; time-zone Europe/London; root-authentication { encrypted-password ""; } name-server { 8.8.8.8; 8.8.4.4; } services { ssh; telnet; xnm-clear-text; netconf { ssh; } dhcp-local-server { group jdhcp-group { interface irb.0; } } web-management { https { system-generated-certificate; } } } syslog { archive size 100k files 3; user * { any emergency; } file messages { any notice; authorization info; } file interactive-commands { interactive-commands any; } } max-configurations-on-flash 15; max-configuration-rollbacks 15; license { autoupdate { url https://ae1.juniper.net/junos/key_retrieval; } } ntp { server 64.99.80.121 prefer; } } security { address-book { global { address network_trust 192.168.1.0/24; address network_company1 10.10.1.0/24; address network_company2 10.0.0.0/24; address company1_sbs 10.10.1.100/32; address company1_sw 10.10.1.101/32; address company2_sbs 10.0.0.1/32; } } screen { ids-option untrust-screen { icmp { ping-death; } ip { source-route-option; tear-drop; } tcp { syn-flood { alarm-threshold 1024; attack-threshold 200; source-threshold 1024; destination-threshold 2048; timeout 20; } land; } } } nat { source { rule-set trust-to-untrust { from zone trust; to zone untrust; rule trust-to-untrust-access { match { source-address 192.168.1.0/24; source-address-name [ network_trust network_company1 network_company2 ]; destination-address 0.0.0.0/0; } then { source-nat { interface; } } } } rule-set company1-to-untrust { from zone company1; to zone untrust; rule company1-to-untrust-access { match { source-address 10.10.1.0/24; destination-address 0.0.0.0/0; } then { source-nat { interface; } } } } rule-set company2-to-untrust { from zone company2; to zone untrust; rule company2-to-untrust-access { match { source-address 10.0.0.0/24; destination-address 0.0.0.0/0; } then { source-nat { interface; } } } } } destination { pool company1-sbs-rdp { address 10.10.1.100/32 port 3389; } pool company1-sw-rdp { address 10.10.1.101/32 port 33899; } pool company2-rdp { address 10.0.0.10/32 port 3389; } rule-set company1-sbs-rdp { from zone [ trust untrust company1 ]; rule company1-sbs-rdp { match { destination-address *.*.131.198/32; destination-port { 3389; } } then { destination-nat { pool { company1-sbs-rdp; } } } } } rule-set company1-sw-rdp { from zone [ trust untrust company1 ]; rule company1-sw-rdp { match { destination-address *.*.131.198/32; destination-port { 33899; } } then { destination-nat { pool { company1-sw-rdp; } } } } } rule-set company2-rdp { from zone [ company2 untrust ]; rule company2-rdp { match { destination-address *.*.138.218/32; destination-port { 3389; } } then { destination-nat { pool { company2-rdp; } } } } } } } policies { from-zone trust to-zone trust { policy trust-to-trust { match { source-address any; destination-address any; application any; } then { permit; } } } from-zone trust to-zone untrust { policy trust-to-untrust { match { source-address any; destination-address any; application any; } then { permit; } } policy allow-trust-clients { match { source-address [ network_trust network_company2 ]; destination-address any; application any; } then { permit; } } } from-zone company1 to-zone untrust { policy allow-company1-clients { match { source-address network_company1; destination-address any; application any; } then { permit; } } } from-zone company1 to-zone company2 { policy company1-to-company2-block { match { source-address network_company1; destination-address network_company2; application any; } then { deny; } } } from-zone company2 to-zone company1 { policy company2-to-company1-block { match { source-address network_company2; destination-address network_company1; application any; } then { deny; } } } from-zone company2 to-zone trust { policy company2-to-trust-block { match { source-address network_company2; destination-address network_trust; application any; } then { deny; } } } from-zone trust to-zone company2 { policy trust-to-company2-block { match { source-address network_trust; destination-address network_company2; application any; } then { deny; } } } from-zone trust to-zone company1 { policy trust-to-company1-allow { match { source-address network_trust; destination-address network_company1; application any; } then { permit; } } } from-zone company1 to-zone trust { policy company1-to-trust-allow { match { source-address network_company1; destination-address network_trust; application any; } then { permit; } } } } zones { security-zone trust { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { irb.0; } } security-zone untrust { screen untrust-screen; interfaces { ge-0/0/0.0 { host-inbound-traffic { system-services { dhcp; tftp; } } } } } security-zone company1 { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { ge-0/0/2.0 { host-inbound-traffic { system-services { ping; ssh; http; https; } } } } } security-zone company2 { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { ge-0/0/3.0 { host-inbound-traffic { system-services { ping; ssh; https; } } } } } } } interfaces { ge-0/0/0 { unit 0 { family inet { address *.*.131.198/30; } } } ge-0/0/1 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/2 { unit 0 { family inet { address 10.10.1.1/24; } } } ge-0/0/3 { unit 0 { family inet { address 10.0.0.254/24; } } } irb { unit 0 { family inet { address 192.168.1.1/24; } } } } routing-options { static { route 0.0.0.0/0 next-hop *.*.131.197; } } protocols { l2-learning { global-mode switching; } } access { address-assignment { pool junosDHCPPool { family inet { network 192.168.1.0/24; range junosRange { low 192.168.1.2; high 192.168.1.254; } dhcp-attributes { router { 192.168.1.1; } propagate-settings ge-0/0/0.0; } } } } } applications { application MS-RDP { protocol tcp; destination-port 3389; } application MS-RDP-ALT { protocol tcp; destination-port 33899; } } vlans { vlan-trust { vlan-id 5; l3-interface irb.0; } }