## Last commit: 2013-02-05 22:48:43 CET by root version 11.2R4.3; system { host-name vpn01.domain.com; time-zone Europe/Amsterdam; root-authentication { encrypted-password "$1$x.NPY5g.$mOGZn2W9r45"; ## SECRET-DATA } name-server { 8.8.8.8/32; } services { ssh; telnet; xnm-clear-text; web-management { http { interface [ vlan.0 fe-0/0/0.0 ]; } https { system-generated-certificate; interface [ vlan.0 fe-0/0/0.0 ]; } } dhcp { router { 192.168.1.1; } pool 192.168.1.0/24 { address-range low 192.168.1.2 high 192.168.1.254; } propagate-settings fe-0/0/0.0; } } syslog { archive size 100k files 3; user * { any emergency; } file messages { any critical; authorization info; } file interactive-commands { interactive-commands error; } } max-configurations-on-flash 5; max-configuration-rollbacks 5; license { autoupdate { url https://ae1.juniper.net/junos/key_retrieval; } } ntp; } interfaces { fe-0/0/0 { unit 0 { family inet { address xx.xx.139.160/24; address xx.xx.139.162/24 { web-authentication http; } } } } fe-0/0/1 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } 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 { address 172.16.1.1/24; } } } } routing-options { static { route 0.0.0.0/0 next-hop 87.233.139.1; route 172.16.0.0/24 next-hop st0.0; route 172.16.0.2/32 next-hop st0.0; } } protocols { stp; } security { ike { policy ike_pol_khondrion { mode aggressive; proposal-set compatible; pre-shared-key ascii-text "$9$RrASlv-dsZUHdbgJUDPf9ApBEyd"; ## SECRET-DATA } policy ike-dyn-vpn-policy { mode aggressive; proposal-set standard; pre-shared-key ascii-text "$9$blYaGF39BIcApeM8XbwfTznAp0B"; ## SECRET-DATA } gateway gw_khondrion { ike-policy ike_pol_khondrion; address xx.xx.196.75; external-interface fe-0/0/0.0; } gateway dyn-vpn-local-gw { ike-policy ike-dyn-vpn-policy; dynamic { hostname dynvpn; connections-limit 5; ike-user-type group-ike-id; } external-interface fe-0/0/0; xauth access-profile dyn-vpn-access-profile; } } ipsec { policy ipsec_pol_khondrion { perfect-forward-secrecy { keys group2; } proposal-set compatible; } policy ipsec-dyn-vpn-policy { proposal-set standard; } vpn khondrion { bind-interface st0.0; ike { gateway gw_khondrion; ipsec-policy ipsec_pol_khondrion; } establish-tunnels immediately; } vpn dyn-vpn { ike { gateway dyn-vpn-local-gw; ipsec-policy ipsec-dyn-vpn-policy; } } } dynamic-vpn { access-profile dyn-vpn-access-profile; clients { all { remote-protected-resources { 172.0.0.0/8; } ipsec-vpn dyn-vpn; user { test; user1; user2; } } } } flow { traceoptions { file flow-debug size 1m files 2 world-readable; flag basic-datapath; packet-filter remote-protected-host { source-prefix 172.16.1.2/32; } packet-filter source-vpn { source-prefix 172.16.1.202/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 source-nat-rule { match { source-address 0.0.0.0/0; } then { source-nat { interface; } } } } } destination { pool 172_16_1_2_port_139 { address 172.16.1.2/32 port 139; } pool 172_16_1_2_port_138 { address 172.16.1.2/32 port 138; } pool 172_16_1_2_port_137 { address 172.16.1.2/32 port 137; } pool 172_16_1_2_port_445 { address 172.16.1.2/32 port 445; } rule-set ruleset1 { from zone untrust; rule xx_xx_139_160_port_139 { match { source-address 0.0.0.0/0; destination-address xx.xx.139.160/32; destination-port 139; } then { destination-nat pool 172_16_1_2_port_139; } } rule xx_xx_139_160_port_445 { match { source-address 0.0.0.0/0; destination-address xx.xx.139.160/32; destination-port 445; } then { destination-nat pool 172_16_1_2_port_445; } } rule xx_xx_139_160_port_138 { match { source-address 0.0.0.0/0; destination-address xx.xx.139.160/32; destination-port 138; } then { destination-nat pool 172_16_1_2_port_138; } } rule xx_xx_139_160_port_137 { match { source-address 0.0.0.0/0; destination-address xx.xx.139.160/32; destination-port 137; } then { destination-nat pool 172_16_1_2_port_137; } } } } proxy-arp { interface vlan.0 { address { 172.16.1.200/32 to 178.16.1.250/32; } } } } policies { from-zone trust to-zone untrust { policy trust-to-untrust { match { source-address any; destination-address any; application any; } then { permit; } } } from-zone trust to-zone trust { policy trust-to-trust { match { source-address any; destination-address any; application any; } then { permit; } } policy policy_out_khondrion { match { source-address addr_172_16_1_0_24; destination-address addr_172_16_0_0_24; application any; } then { permit; } } policy policy_in_khondrion { match { source-address addr_172_16_0_0_24; destination-address addr_172_16_1_0_24; application any; } then { permit; } } } from-zone untrust to-zone trust { policy dyn-vpn-policy { match { source-address any; destination-address any; application any; } then { permit { tunnel { ipsec-vpn dyn-vpn; } } } } policy untrust-to-trust { match { source-address any; destination-address any; application any; } then { permit; } } } from-zone trust to-zone vpn { policy trust-to-vpn { match { source-address any; destination-address any; application any; } then { permit; } } } from-zone vpn to-zone trust { policy vpn-to-trust { match { source-address any; destination-address any; application any; } then { permit; } } } } zones { security-zone trust { address-book { address addr_172_16_1_0_24 172.16.1.0/24; address addr_172_16_0_0_24 172.16.0.0/24; } host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { vlan.0 { host-inbound-traffic { system-services { all; } protocols { all; } } } fe-0/0/1.0 { host-inbound-traffic { system-services { all; } protocols { all; } } } } } security-zone untrust { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { fe-0/0/0.0 { host-inbound-traffic { system-services { dhcp; tftp; all; ike; https; ping; } protocols { all; } } } } } security-zone vpn { host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { st0.0; } } } } access { profile dyn-vpn-access-profile { client test { firewall-user { password "$9$wU2JU3nC1RStuKWLxws5QF6tul"; ## SECRET-DATA } } client user1 { firewall-user { password "$9$Q5yJ3CpKvLbs4xNGjHqeMxNdbsYoJ"; ## SECRET-DATA } } client user2 { firewall-user { password "$9$bRYaGF39BIcXbwfTznAp0BIRSr"; ## SECRET-DATA } } address-assignment { pool dyn-vpn-address-pool; } } address-assignment { pool dyn-vpn-address-pool { family inet { network 172.16.1.0/24; range dvpn-range { low 172.16.1.200; high 172.16.1.250; } xauth-attributes { primary-dns 8.8.8.8/32; } } } } firewall-authentication { web-authentication { default-profile dyn-vpn-access-profile; } } } vlans { vlan-trust { vlan-id 3; l3-interface vlan.0; } }