## Last changed: 2015-10-14 10:42:42 CEST version 12.1X44-D45.2; system { host-name srx-besimple; time-zone Europe/Rome; root-authentication { encrypted-password ""; } name-server { 208.67.222.222; 208.67.220.220; } services { ssh; telnet; xnm-clear-text; web-management { http { interface vlan.0; } https { system-generated-certificate; interface [ vlan.0 fe-0/0/1.0 fe-0/0/0.0 ]; } } dhcp { pool 172.16.0.0/24 { address-range low 172.16.0.100 high 172.16.0.200; name-server { 8.8.8.8; 8.8.4.4; } router { 172.16.0.1; } propagate-settings vlan.0; } } } syslog { archive size 100k files 3; user * { any emergency; } file messages { any critical; authorization info; } file interactive-commands { interactive-commands error; } file kmd-logs { daemon info; match KMD; } } max-configurations-on-flash 20; max-configuration-rollbacks 20; license { autoupdate { url https://ae1.juniper.net/junos/key_retrieval; } } ntp { boot-server 193.204.114.105; server 193.204.114.105; } } interfaces { fe-0/0/0 { unit 0 { description "Fastweb Home"; family inet { dhcp; } } } fe-0/0/1 { unit 0 { description "Fastweb SBS"; family inet { address LOCAL_IP/29; } } } fe-0/0/2 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/3 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/4 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/5 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/6 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } fe-0/0/7 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } st0 { unit 0 { family inet; } } vlan { unit 0 { family inet { filter { input filter1; } address 172.16.0.1/24; address 172.16.0.2/24 { web-authentication http; } } } } } routing-options { interface-routes { rib-group inet IMPORT-PHY; } static { route 0.0.0.0/0 next-hop [ 192.168.1.254 LOCAL_IP NEXT_HOP ]; route 172.16.200.0/24 next-hop st0.0; } rib-groups { IMPORT-PHY { import-rib [ inet.0 fw_sbs.inet.0 fw_home.inet.0 ]; } } } protocols { stp; } security { idp { security-package { automatic { start-time "2015-7-16.12:30:00 +0200"; interval 24; enable; } } } ike { proposal ike-proposal-besFarm { authentication-method pre-shared-keys; dh-group group2; authentication-algorithm sha1; encryption-algorithm aes-128-cbc; lifetime-seconds 3600; } policy ike-policy-besFarm { mode main; proposals ike-proposal-besFarm; pre-shared-key ascii-text ""; } gateway ike-gate-besFarm { ike-policy ike-policy-besFarm; address REMOTE_IP; dead-peer-detection; nat-keepalive 60; remote-identity inet REMOTE_IP; external-interface fe-0/0/1.0; version v1-only; } } ipsec { proposal ipsec-proposal-besFarm { protocol esp; authentication-algorithm hmac-sha1-96; encryption-algorithm aes-128-cbc; lifetime-seconds 3600; } policy ipsec-policy-besFarm { perfect-forward-secrecy { keys group2; } proposals ipsec-proposal-besFarm; } vpn ipsec-vpn-besFarm { bind-interface st0.0; ike { gateway ike-gate-besFarm; ipsec-policy ipsec-policy-besFarm; } establish-tunnels immediately; } } alg { pptp disable; } utm { custom-objects { url-pattern { urllistwhite { value WHITELIST; } } custom-url-category { whitelist { value urllistwhite; } } } feature-profile { web-filtering { url-whitelist whitelist; surf-control-integrated { profile junos-wf-cpa-default { category { Advertisements { action log-and-permit; } } custom-block-message ""; } } } } utm-policy utm_policy { web-filtering { http-profile junos-wf-cpa-default; } } } 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 { pool FW_BES_POOL { address { LOCAL_IP/32 to LOCAL_IP_END/32; } port no-translation; } rule-set trust-to-untrust_fw_home { from zone trust; to zone untrust_fw_home; rule source-nat-home { match { source-address 0.0.0.0/0; } then { source-nat { interface; } } } } rule-set trust-to-untrust_fw_sbs { from zone trust; to zone untrust_fw_sbs; rule GRE { match { destination-address 0.0.0.0/0; protocol gre; } then { source-nat { pool { FW_BES_POOL; } } } } rule PPTP { match { destination-address 0.0.0.0/0; destination-port 1723; } then { source-nat { pool { FW_BES_POOL; } } } } rule source-nat-all { match { source-address 0.0.0.0/0; } then { source-nat { interface; } } } rule IPSec { match { destination-address 0.0.0.0/0; destination-port 500; } then { source-nat { pool { FW_BES_POOL; } } } } } rule-set NAT_VPN { from zone trust; to zone vpnFarm; rule NO_NAT { match { source-address 0.0.0.0/0; destination-address 0.0.0.0/0; } then { source-nat { off; } } } } } } policies { from-zone trust to-zone vpnFarm { policy trust-vpnFarm-besFarm { match { source-address net-besFarm_172-16-0-0--24; destination-address net-besFarm_172-16-200-0--24; application any; } then { permit; } } } from-zone vpnFarm to-zone trust { policy vpnFarm-trust-besFarm { match { source-address net-besFarm_172-16-200-0--24; destination-address net-besFarm_172-16-0-0--24; application any; } then { permit; } } } from-zone trust to-zone untrust_fw_home { policy trust-to-untrust_fw_home { match { source-address any; destination-address any; application any; } then { permit { application-services { utm-policy utm_policy; } } } } policy full_Internet { match { source-address any; destination-address any; application junos-http; } then { permit { firewall-authentication { web-authentication; } } } } } from-zone trust to-zone untrust_fw_sbs { policy trust-to-untrust_fw_sbs { match { source-address any; destination-address any; application any; } then { permit; } } } } zones { security-zone trust { address-book { address net-besFarm_172-16-0-0--24 172.16.0.0/24; } host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { vlan.0; } } security-zone untrust_fw_home { screen untrust-screen; host-inbound-traffic { system-services { https; ssh; } } interfaces { fe-0/0/0.0 { host-inbound-traffic { system-services { dhcp; } } } } } security-zone untrust_fw_sbs { screen untrust-screen; host-inbound-traffic { system-services { ssh; ike; https; ping; } } interfaces { fe-0/0/1.0; } } security-zone vpnFarm { address-book { address net-besFarm_172-16-200-0--24 172.16.200.0/24; } interfaces { st0.0; } } } } firewall { filter filter1 { term mgmtallow { from { destination-address { 172.16.0.0/24; } } then accept; } term vpn { from { destination-port pptp; } then { routing-instance fw_sbs; } } term vpn_gre { from { protocol gre; } then { routing-instance fw_sbs; } } term vpn_ipsec_ip { from { protocol [ ah esp ]; } then { routing-instance fw_sbs; } } term vpn_ipsec { from { protocol udp; destination-port [ 500 4500 ]; } then { routing-instance fw_sbs; } } term vpnFarm { from { destination-address { 172.16.200.0/24; } } then accept; } term default { then { routing-instance fw_home; } } } } access { profile WebFilter_AccProf { authentication-order password; client marco { firewall-user { password ""; } } } firewall-authentication { web-authentication { default-profile WebFilter_AccProf; } } } routing-instances { fw_home { instance-type forwarding; routing-options { static { route 0.0.0.0/0 { next-hop 192.168.1.254; qualified-next-hop NEXT_HOP { preference 100; } } } } } fw_sbs { instance-type forwarding; routing-options { static { route 0.0.0.0/0 next-hop NEXT_HOP; } } } } vlans { vlan-trust { vlan-id 3; l3-interface vlan.0; } }