## Last changed: 2013-05-30 08:40:58 EDT version 12.1R4.7; system { host-name SRX240; time-zone America/New_York; root-authentication { encrypted-password "$1$hBoNOR7t$YsAvhSQFGN/aPvuJLEP8y."; ## SECRET-DATA } name-server { 208.67.222.222; 208.67.220.220; 8.8.8.8; } scripts { op { file login-script.slax; file policy-test.slax; } } login { class login-script { login-script login-script.slax; permissions configure; } class super-user-local { login-script login-script.slax; } user abcd { uid 2000; class login-script; authentication { encrypted-password "$1$7Th0JjlJ$8pa6CRdWGtWDTQMbKSxw9/"; ## SECRET-DATA } } user sadm { uid 2001; class super-user; authentication { encrypted-password "$1$GJVGyVHD$OKjdUVBBylghMnta6e3yp."; ## SECRET-DATA } } } services { ftp; ssh; telnet; xnm-clear-text; web-management { https { system-generated-certificate; interface [ vlan.0 ge-0/0/15.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 ge-0/0/0.0; } } syslog { archive size 100k files 3; user * { any emergency; } host 10.102.100.17 { any any; match RT_FLOW_SESSION; facility-override local4; } 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 { server 203.221.91.147; server 82.113.154.206; server 142.3.100.15; server 65.197.254.7 prefer; server 193.11.166.2 prefer; } } interfaces { ge-0/0/0 { unit 0; } ge-0/0/1 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/2 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/3 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/4 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/5 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/6 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/7 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/8 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/9 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/10 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/11 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/12 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/13 { unit 0 { family ethernet-switching { vlan { members vlan-trust; } } } } ge-0/0/14 { unit 0 { family inet { filter { input Blah; } address 172.19.22.1/24; } } } ge-0/0/15 { unit 0 { family inet { address 10.102.100.115/23; } } } st0 { unit 0 { family inet; } unit 1 { family inet; } } vlan { unit 0 { family inet { address 192.168.1.1/24; } } } } forwarding-options { packet-capture { file filename Blah size 1k; maximum-capture-size 1500; } } routing-options { static { route 0.0.0.0/0 next-hop 10.102.100.1; route 172.16.130.150/32 next-hop st0.1; } } protocols { stp; } security { ike { traceoptions { file vpn-deb-ike size 1m; flag ike; } proposal Phase1-Proposal { authentication-method pre-shared-keys; dh-group group2; authentication-algorithm sha1; encryption-algorithm aes-128-cbc; lifetime-seconds 86400; } policy IKE_Policy { proposals Phase1-Proposal; pre-shared-key ascii-text "$9$MuuLXNUDkQz6.P1hSyKvoJZj.Pz36pO1"; ## SECRET-DATA } gateway bharat-gw { ike-policy IKE_Policy; address 10.102.101.102; external-interface ge-0/0/15.0; } } ipsec { traceoptions { flag security-associations; flag all; } proposal Phase2-Proposal { authentication-algorithm hmac-md5-96; encryption-algorithm 3des-cbc; } policy IPSEC-Policy { proposals Phase2-Proposal; } vpn IPSEC-Tunnel-To-Bharat { bind-interface st0.0; ike { gateway bharat-gw; proxy-identity { local 172.19.22.50/32; remote 172.16.130.150/32; } ipsec-policy IPSEC-Policy; } } vpn IPSEC-Tunnel-To-Bharat-Host-2 { bind-interface st0.1; ike { gateway bharat-gw; proxy-identity { local 172.19.22.51/32; remote 172.16.130.150/32; } ipsec-policy IPSEC-Policy; } } } flow { traceoptions { file sdfg; flag packet-drops; packet-filter MatchTraffic { destination-prefix 172.19.22.50/32; } inactive: packet-filter Match1 { source-prefix 5.5.5.5/32; destination-prefix 172.19.22.50/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 { traceoptions { file nat-debug; flag all; flag static-nat-rt; flag static-nat-pfe; } source { pool A { address { 10.102.101.219/32; } } pool nat-pool { address { 3.3.3.3/32; } } rule-set rs1 { from zone trust; to zone untrust; inactive: rule 2 { match { source-address 172.19.22.50/32; destination-address 5.5.5.5/32; } then { source-nat { off; } } } rule r1 { match { source-address [ 172.19.22.50/32 172.19.22.51/32 ]; } then { source-nat { interface; } } } } inactive: rule-set From-Trust-To-VPN { from zone trust; to zone vpn-zone; inactive: rule r235 { match { source-address 172.19.22.50/32; destination-address 172.16.130.150/32; } then { source-nat { pool { nat-pool; } } } } } } destination { pool pool-dst-nat { address 172.19.22.50/32; } inactive: rule-set DST-NAT-SULE-SET { from zone vpn-zone; rule rule1-dst-nat { match { destination-address 3.3.3.3/32; } then { destination-nat pool pool-dst-nat; } } } } static { inactive: rule-set STATIC-RULE-SET-VPN-TO-TRUST { from zone vpn-zone; rule rule1 { match { destination-address 3.3.3.3/32; } then { static-nat { prefix { 172.19.22.50/32; } } } } } inactive: rule-set STATIC-RULE-SET { from zone untrust; rule rule1 { match { destination-address 2.2.2.2/32; } then { static-nat { prefix { 172.19.22.50/32; } } } } } inactive: rule-set STATIC-RULE-SET-TRUST-TO-VPN { from zone trust; rule rule11 { match { destination-address 7.7.7.7/32; } then { static-nat { prefix { 172.16.130.150/32; } } } } inactive: rule rule12 { match { destination-address 7.7.7.8/32; } then { static-nat { prefix { 172.16.130.151/32; } } } } } } proxy-arp { interface ge-0/0/15.0 { address { 10.102.101.219/32; 10.102.101.220/32; } } } } policies { from-zone trust to-zone untrust { inactive: policy outbound { match { source-address internal_host; destination-address Bharat-internal-host; application any; } then { permit; log { session-init; session-close; } } } inactive: policy outbound-11 { match { source-address internal_host; destination-address asa-int-ip-2; application any; } then { permit { tunnel { ipsec-vpn IPSEC-Tunnel-To-Bharat; } } log { session-init; session-close; } } } policy outbound-1 { match { source-address internal_net; destination-address any; application any; } then { permit; log { session-init; session-close; } } } } from-zone untrust to-zone trust { inactive: policy inbound-top2 { match { source-address Bharat-internal-host; destination-address internal_host; application any; } then { permit { tunnel { ipsec-vpn IPSEC-Tunnel-To-Bharat; } } log { session-init; session-close; } } } policy inbound { match { source-address any-ipv4; destination-address internal_host; application any; } then { permit; log { session-init; session-close; } } } } from-zone trust to-zone vpn-zone { policy TRUST-TO-VPN-1 { match { source-address [ internal_host-2 internal_host ]; destination-address [ Bharat-internal-host-vpn Bharat-internal-host-2-vpn ]; application any; } then { permit; } } } from-zone vpn-zone to-zone trust { policy VPN-TO-TRUST-1 { match { source-address [ Bharat-internal-host-vpn Bharat-internal-host-2-vpn ]; destination-address [ internal_host internal_host-2 ]; application any; } then { permit; } } } global { policy GLOB-POL { match { source-address any; destination-address any; application any; } then { permit; } } } default-policy { deny-all; } } zones { security-zone trust { address-book { address internal_host 172.19.22.50/32; address static-translated-ip 3.3.3.3/32; address internal_net 172.19.22.0/24; address internal_host_translated 2.2.2.2/32; address internal_host-2 172.19.22.51/32; } host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { vlan.0; ge-0/0/14.0; } } security-zone untrust { address-book { address Bharat-internal-host 172.16.130.150/32; address Bharat-internal-net 172.16.130.0/24; address asa-int-ip-2 5.5.5.5/32; address h-4.1.1.1 4.1.1.1/32; } screen untrust-screen; host-inbound-traffic { system-services { ssh; https; ike; telnet; all; } } interfaces { ge-0/0/0.0 { host-inbound-traffic { system-services { tftp; dhcp; } } } ge-0/0/15.0; st0.1; } } security-zone vpn-zone { address-book { address Bharat-internal-host-vpn 172.16.130.150/32; address Bharat-internal-host-2-vpn 172.16.130.151/32; } host-inbound-traffic { system-services { all; } } interfaces { st0.0; } } } } firewall { filter Blah { term capture { from { source-address { 172.19.22.50/32; } destination-address { 172.16.130.150/32; } } then { routing-instance vpn-route-instance; } } term capture2 { then accept; } } filter Blah-Blah { term capture { from { source-address { 172.16.130.150/32; } destination-address { 172.19.22.50/32; } } then { routing-instance vpn-route-instance; } } term capture2 { then accept; } } } routing-instances { vpn-route-instance { instance-type virtual-router; interface st0.0; routing-options { static { route 172.16.130.150/32 next-hop st0.0; route 0.0.0.0/0 next-hop 10.102.100.1; } } } } applications { application tcp2222 { protocol tcp; destination-port 2222; } } vlans { vlan-trust { vlan-id 3; l3-interface vlan.0; } }