Compare cert salaries and plan your next career move
[edit security nat static] rule-set ACME-NAT { from routing-instance LAN; rule DOUBLE-NAT-ACME { match { destination-address 100.96.30.30/32; } then { static-nat { prefix { 10.30.30.30/32; } } } } } rule-set LAN-NAT { from routing-instance ACME; rule DOUBLE-NAT-LAN { match { destination-address 100.64.10.202/32; } then { static-nat { prefix { 10.10.10.202/32; } } } } } } }
Jan 15 21:30:05 21:30:05.520366:CID-1:RT:flow_initiate_first_path: first pak no session Jan 15 21:30:05 21:30:05.520366:CID-1:RT: flow find session returns error. Jan 15 21:30:05 21:30:05.520366:CID-1:RT: ----- flow_process_pkt rc 0x7 (fp rc -1) Jan 15 21:30:06 21:30:06.536392:CID-1:RT:<10.10.10.202/250->100.96.30.30/2793;1> matched filter ICMP: Jan 15 21:30:06 21:30:06.536392:CID-1:RT:packet [84] ipid = 51601, @4091a31a Jan 15 21:30:06 21:30:06.536392:CID-1:RT:---- flow_process_pkt: (thd 1): flow_ctxt type 14, common flag 0x0, mbuf 0x4091a100, rtbl_idx = 5 Jan 15 21:30:06 21:30:06.536392:CID-1:RT: flow process pak fast ifl 69 in_ifp fe-0/0/0.0 [I][B]## Initial connection[/B][/I] [B]Jan 15 21:30:06 21:30:06.536392:CID-1:RT: fe-0/0/0.0:10.10.10.202->100.96.30.30, icmp, (8/0)[/B] Jan 15 21:30:06 21:30:06.536392:CID-1:RT: find flow: table 0x42687228, hash 15454(0xffff), sa 10.10.10.202, da 100.96.30.30, sp 250, dp 2793, proto 1, tok 20486 Jan 15 21:30:06 21:30:06.536392:CID-1:RT: no session found, start first path. in_tunnel - 0, from_cp_flag - 0 Jan 15 21:30:06 21:30:06.536392:CID-1:RT: flow_first_create_session Jan 15 21:30:06 21:30:06.536392:CID-1:RT:Installing pending sess (75[IMG]https://us.v-cdn.net/6030959/uploads/images/smilies/icon_cool.gif[/IMG] in ager Jan 15 21:30:06 21:30:06.536392:CID-1:RT:First path alloc and instl pending session, natp=0x44768170, id=758 Jan 15 21:30:06 21:30:06.536392:CID-1:RT: flow_first_in_dst_nat: in <fe-0/0/0.0>, out <N/A> dst_adr 100.96.30.30, sp 250, dp 2793 Jan 15 21:30:06 21:30:06.536392:CID-1:RT: chose interface fe-0/0/0.0 as incoming nat if. [I][B]## Static happens as expected[/B][/I], [B][I]100.96.30.30 xlated to 10.30.30.30[/I][/B] [B]Jan 15 21:30:06 21:30:06.536392:CID-1:RT:flow_first_rule_dst_xlate: packet 10.10.10.202->100.96.30.30 nsp2 0.0.0.0->10.30.30.30.[/B] Jan 15 21:30:06 21:30:06.536392:CID-1:RT:flow_first_routing: vr_id 5, call flow_route_lookup(): src_ip 10.10.10.202, x_dst_ip 10.30.30.30, in ifp fe-0/0/0.0, out ifp N/A sp 250, dp 2793, ip_proto 1, tos 0 Jan 15 21:30:06 21:30:06.536392:CID-1:RT:Doing DESTINATION addr route-lookup Jan 15 21:30:06 21:30:06.536392:CID-1:RT:flow_rt_lkup in VR-id: 5 Jan 15 21:30:06 21:30:06.536392:CID-1:RT:flow_rt_lkup: Found route entry 0x0x45bc02e0,nh id 0x264, out if 0x47 Jan 15 21:30:06 21:30:06.536392:CID-1:RT:flow_rt_lkup: nh word 0x2640011 Jan 15 21:30:06 21:30:06.536392:CID-1:RT:flow_ipv4_rt_lkup success 10.30.30.30, iifl 0x45, oifl 0x47 [B][I]## Route-lookup happens on Ingress VRF, tries to push the connection back out the same Zone[/I] Jan 15 21:30:06 21:30:06.536392:CID-1:RT: routed (x_dst_ip 10.30.30.30) from LAN (fe-0/0/0.0 in 0) to fe-1/0/0.0, Next-hop: 10.10.15.20[/B] [B]Jan 15 21:30:06 21:30:06.536392:CID-1:RT:flow_first_policy_search: policy search from zone LAN-> zone LAN (0x114,0xfa0ae9,0xae9)[/B] Jan 15 21:30:06 21:30:06.536392:CID-1:RT: app 0, timeout 60s, curr ageout 60s Jan 15 21:30:06 21:30:06.536392:CID-1:RT: packet dropped, denied by policy Jan 15 21:30:06 21:30:06.536392:CID-1:RT: denied by policy default-policy-00(2), dropping pkt Jan 15 21:30:06 21:30:06.536392:CID-1:RT: packet dropped, policy deny. Jan 15 21:30:06 21:30:06.536392:CID-1:RT:set_nat_invalid: natp:id 758, flag 3c5f
[edit security nat] nat { source { pool ACME-NAT { routing-instance { LAN; } address { 100.96.30.30/32; } port inactive: no-translation; } pool LAN-NAT { routing-instance { ACME; } address { 100.64.10.202/32; } port inactive: no-translation; } rule-set SOURCE-ACME-LAN { from zone ACME; to zone LAN; rule SNAT-1 { match { source-address 10.30.30.30/32; } then { source-nat { pool { ACME-NAT; } } } } } rule-set SOURCE-LAN-ACME { from zone LAN; to zone ACME; rule SNAT-2 { match { source-address 10.10.10.202/32; } then { source-nat { pool { LAN-NAT; } } } } } } destination { pool LAN { routing-instance { LAN; } address 10.10.10.202/32; } pool ACME { routing-instance { ACME; } address 10.30.30.30/32; } rule-set DEST-NAT-ACME { from zone LAN; rule DEST-NAT-ACME-LAN { match { destination-address 100.96.30.30/32; } then { destination-nat pool ACME; } } } rule-set DEST-NAT-LAN { from zone ACME; rule DEST-NAT-LAN-ACME { match { destination-address 100.64.10.202/11; } then { destination-nat pool LAN; } } } }
Jan 15 22:21:50 22:21:52.293174:CID-2:RT: fe-0/0/0.0:10.10.10.202->100.96.30.30, icmp, (8/0) Jan 15 22:21:50 22:21:52.293174:CID-2:RT: find flow: table 0x42686e08, hash 12619(0xffff), sa 10.10.10.202, da 100.96.30.30, sp 0, dp 2967, proto 1, tok 20486 Jan 15 22:21:50 22:21:52.293174:CID-2:RT: no session found, start first path. in_tunnel - 0, from_cp_flag - 0 Jan 15 22:21:50 22:21:52.293174:CID-2:RT: flow_first_create_session <snip> [I][B]## Destination NAT happens as expected[/B][/I] Jan 15 22:21:50 22:21:52.293174:CID-2:RT: chose interface fe-0/0/0.0 as incoming nat if. Jan 15 22:21:50 22:21:52.293174:CID-2:RT:flow_first_rule_dst_xlate: DST xlate: 100.96.30.30(2967) to 10.30.30.30(2967), rule/pool id 1/32769 [I][B]## Correct opposing VRF is chosen for the route lookup[/B][/I] Jan 15 22:21:50 22:21:52.293174:CID-2:RT:flow_first_routing: vr_id 4, call flow_route_lookup(): src_ip 10.10.10.202, x_dst_ip 10.30.30.30, in ifp fe-0/0/0.0, out ifp N/A sp 0, dp 2967, ip_proto 1, tos 0 Jan 15 22:21:50 22:21:52.293174:CID-2:RT:Doing DESTINATION addr route-lookup [B]Jan 15 22:21:50 22:21:52.293174:CID-2:RT:flow_rt_lkup in VR-id: 4[/B] Jan 15 22:21:50 22:21:52.293174:CID-2:RT:flow_rt_lkup: Found route entry 0x0x45baeac0,nh id 0x267, out if 0x48 Jan 15 22:21:50 22:21:52.293174:CID-2:RT:flow_rt_lkup: nh word 0xc0010 Jan 15 22:21:50 22:21:52.293174:CID-2:RT:flow_ipv4_rt_lkup success 10.30.30.30, iifl 0x45, oifl 0x48 [B]Jan 15 22:21:50 22:21:52.293174:CID-2:RT: routed (x_dst_ip 10.30.30.30) from LAN (fe-0/0/0.0 in 0) to fe-1/0/1.0, Next-hop: 10.30.226.22 [/B]<snip> [I][B]## Source NAT happens as expected[/B][/I] Jan 15 22:21:50 22:21:52.293174:CID-2:RT:flow_first_src_xlate: src nat returns status: 1, rule/pool id: 2/32773, pst_nat: False. [B]Jan 15 22:21:50 22:21:52.293174:CID-2:RT: dip id = 5/1, 10.10.10.202/0->100.64.10.202/20979 protocol 58[/B] <mega snip>
routing-instances { ACME { instance-type virtual-router; interface fe-0/0/1.0; interface fe-1/0/1.0; routing-options { graceful-restart { restart-duration 120; } inactive: instance-import LAN-to-ACME; } protocols { bgp { local-as 199; graceful-restart { stale-routes-time 10; } group WAN1 { peer-as 2600; neighbor 10.20.126.21; } group WAN2 { peer-as 2600; neighbor 10.30.226.22; } } } } LAN { instance-type virtual-router; interface fe-0/0/0.0; interface fe-1/0/0.0; routing-options { inactive: instance-import ACME-to-LAN; } protocols { ospf { graceful-restart { restart-duration 10; notify-duration 10; } area 0.0.0.0 { interface fe-0/0/0.0; interface fe-1/0/0.0; } } } } } [I][B]## Need this since there is nothing inet.0 currently, mgmt is local.[/B][/I] routing-options { max-interface-supported 0; }
security { nat { static { rule-set A-B { from routing-instance OrgA; rule A { match { destination-address 2.2.2.0/24; } then { [B]static-nat prefix 192.168.1.0/24 [U]routing-instance OrgB; [/U][/B] } } } rule-set B-A { from routing-instance OrgB; rule B { match { destination-address 1.1.1.0/24; } then { [B]static-nat prefix 192.168.1.0/24 [U]routing-instance OrgA; [/U][/B] } } } } } }
[B][edit security nat static][/B] rule-set ACME-NAT { from routing-instance LAN; rule DOUBLE-NAT-ACME { match { destination-address 100.96.30.30/32; } then { static-nat { prefix { 10.30.30.30/32; routing-instance ACME; } } } } } rule-set LAN-NAT { from routing-instance ACME; rule DOUBLE-NAT-LAN { match { destination-address 100.64.10.202/32; } then { static-nat { prefix { 10.10.10.202/32; routing-instance LAN; } } } } rule DOUBLE-NAT-LAN-2 { match { destination-address 100.64.30.30/32; } then { static-nat { prefix { 10.30.30.30/32; routing-instance LAN; } } } } } [B][edit policy-options][/B] prefix-list LAN-NAT { 100.64.0.0/11; 100.64.0.0/12; 100.80.0.0/12; } prefix-list ACME-NAT { 100.96.0.0/11; 100.96.0.0/12; 100.112.0.0/12; } policy-statement ACME-BGP-EXPORT { term ACME-BGP-to-LAN-OSPF { from { protocol static; inactive: prefix-list ACME-NAT; } then accept; } } policy-statement LAN-OSPF-EXPORT { term LAN-OSPF-to-ACME-BGP { from { protocol [ static direct ]; inactive: prefix-list LAN-NAT; } then accept; } } [B][edit routing-instances][/B]ACME { instance-type virtual-router; interface fe-0/0/1.0; interface fe-1/0/1.0; interface lo0.200; routing-options { graceful-restart { restart-duration 120; } static { route 100.64.0.0/11 { next-hop 192.0.2.200; passive; [B][I] ## You need to set the Passive tag to force loading into each VRF to then be able to redistribute it[/I][/B] } } inactive: instance-import LAN-to-ACME; } protocols { bgp { export ACME-BGP-EXPORT; local-as 199; graceful-restart { stale-routes-time 10; } group WAN1 { peer-as 2600; neighbor 10.20.126.21; } group WAN2 { peer-as 2600; neighbor 10.30.226.22; } } } } LAN { instance-type virtual-router; interface fe-0/0/0.0; interface fe-1/0/0.0; interface lo0.100; routing-options { static { route 100.96.0.0/11 { next-hop 192.0.2.100; passive;[B][I] ## You need to set the Passive tag to force loading into each VRF to then be able to redistribute it[/I][/B] } } inactive: instance-import ACME-to-LAN; } protocols { ospf { graceful-restart { restart-duration 10; notify-duration 10; } export LAN-OSPF-EXPORT; area 0.0.0.0 { interface fe-0/0/0.0; interface fe-1/0/0.0; } } } } [B][edit interfaces][/B] fe-0/0/0 { unit 0 { family inet { address 10.10.10.200/24; } } } fe-0/0/1 { unit 0 { family inet { address 10.20.126.200/24; } } } fe-0/0/3 { unit 0; } fe-0/0/4 { unit 0; } fe-1/0/0 { unit 0 { family inet { address 10.10.15.201/24; } } } fe-1/0/1 { unit 0 { family inet { address 10.30.226.201/24; } } } fab0 { fabric-options { member-interfaces { fe-0/0/5; } } } fab1 { fabric-options { member-interfaces { fe-1/0/5; } } } fxp0 { unit 0 { family inet { address 192.168.1.199/24 { master-only; } } } } lo0 { unit 0 { family inet { address 199.199.199.199/32; } } unit 100 { family inet { address 192.0.2.100/31; inactive: address 100.96.255.254/11; } } unit 200 { family inet { address 192.0.2.200/31; } } }
Ahriakin wrote: » Aldur, you need to update sections 5.41 and 5.42 of the AJSEC guide (and let the O'Reilly folks know)
[edit policy-options] prefix-list IMPORT-ACME-to-LAN { 10.254.255.0/24; 10.255.255.0/24; } prefix-list IMPORT-LAN-to-ACME { 10.254.254.0/24; 10.255.254.0/24; } [B][I]## Allow ACME VRF BGP to export the LAN VRF NAT range to it's peers only if it the tracking conditions are met.[/I][/B] policy-statement ACME-BGP-EXPORT { term LAN-NAT-RANGE { from { protocol static; route-filter 100.64.0.0/11 orlonger; condition [ LAN-TRACKED-ROUTES-1 LAN-TRACKED-ROUTES-2 ]; } then accept; } term LAN-NO-NAT-RANGES { from { prefix-list IMPORT-LAN-to-ACME; } then accept; } term DENY-ALL { then reject; } } policy-statement LAN-BGP-EXPORT { [B][I] ## Allow LAN VRF BGP to export the ACM VRF NAT range to it's peers only if it the tracking conditions are met.[/I][/B] term ACME-NAT-RANGE { from { protocol static; route-filter 100.96.0.0/11 orlonger; condition [ ACME-TRACKED-ROUTES-1 ACME-TRACKED-ROUTES-2 ]; } then accept; } [B][I] ## Export pre-defined list of prefixes that will not be Static-NAT'd between VRFs[/I][/B] term ACME-NO-NAT-RANGES { from { prefix-list IMPORT-ACME-to-LAN; } then accept; } [B][I] ## Block all other prefixes from export to BGP peers[/I][/B] term DENY-ALL { then reject; } } ## Policy to control prefixes that will be leaked from ACME VRF to LAN VRF policy-statement ROUTE-LEAK-ACME-to-LAN { term ACCEPTED-PREFIXES-ACME { from { instance ACME; prefix-list IMPORT-ACME-to-LAN; } then accept; } term DENY-ALL { then reject; } } policy-statement ROUTE-LEAK-LAN-to-ACME { term ACCEPTED-PREFIXES-LAN { from { instance LAN; prefix-list IMPORT-LAN-to-ACME; } then accept; } term DENY-ALL { then reject; } } condition ACME-TRACKED-ROUTES-1 { if-route-exists { 10.254.10.0/24; table ACME.inet.0; } } condition ACME-TRACKED-ROUTES-2 { if-route-exists { 10.255.10.0/24; table ACME.inet.0; } } condition LAN-TRACKED-ROUTES-1 { if-route-exists { 10.254.10.0/24; table LAN.inet.0; } } condition LAN-TRACKED-ROUTES-2 { if-route-exists { 10.255.10.0/24; table LAN.inet.0; } } }
routing-instances { ACME { instance-type virtual-router; interface lo0.2000; interface reth1.0; routing-options { graceful-restart { restart-duration 120; } static { route 100.64.0.0/11 { next-hop 192.0.2.2; passive; } } router-id 10.0.20.1; autonomous-system 2001; instance-import ROUTE-LEAK-LAN-to-ACME; } protocols { bgp { graceful-restart { stale-routes-time 360; } group ACME-PEERS { export ACME-BGP-EXPORT; peer-as 2000; neighbor 10.10.20.2; neighbor 10.10.20.3; } } } } LAN { instance-type virtual-router; interface lo0.1000; interface reth0.0; routing-options { graceful-restart { restart-duration 120; } static { route 100.96.0.0/11 { next-hop 192.0.2.1; passive; } } router-id 10.0.10.1; autonomous-system 1001; instance-import ROUTE-LEAK-ACME-to-LAN; } protocols { bgp { graceful-restart { stale-routes-time 360; } group LAN-PEERS { export LAN-BGP-EXPORT; peer-as 1000; neighbor 10.10.10.2; neighbor 10.10.10.3; } } } } }
[edit security] nat { source { pool LAN-SOURCE-POOL-1 { routing-instance { ACME; } address { 100.64.40.1/32; } } pool LAN-SOURCE-POOL-2 { routing-instance { ACME; } address { 100.80.40.1/32; } } pool ACME-SOURCE-POOL-1 { routing-instance { LAN; } address { 100.96.40.1/32; } } pool ACME-SOURCE-POOL-2 { routing-instance { LAN; } address { 100.112.40.1/32; } } rule-set LAN-to-ACME { from routing-instance LAN; to routing-instance ACME; rule SNAT-LAN-1 { match { source-address 10.254.40.0/24; } then { source-nat { pool { LAN-SOURCE-POOL-1; } } } } rule SNAT-LAN-2 { match { source-address 10.255.40.0/24; } then { source-nat { pool { LAN-SOURCE-POOL-2; } } } } } rule-set ACME-to-LAN { from routing-instance ACME; to routing-instance [ ACME LAN ]; rule SNAT-ACME-1 { match { source-address 10.254.40.0/24; } then { source-nat { pool { ACME-SOURCE-POOL-1; } } } } rule SNAT-ACME-2 { match { source-address 10.255.40.0/24; } then { source-nat { pool { ACME-SOURCE-POOL-2; } } } } } }
[edit security] static { rule-set LAN-to-ACME-Overlap { from routing-instance LAN; rule ACME-Overlap-1 { match { destination-address 100.96.10.0/24; } then { static-nat { prefix { 10.254.10.0/24; routing-instance ACME; } } } } rule-set ACME-to-LAN-Overlap { from routing-instance ACME; rule LAN-Overlap-1 { match { destination-address 100.64.10.0/24; } then { static-nat { prefix { 10.254.10.0/24; routing-instance LAN; } } } }
Compare salaries for top cybersecurity certifications. Free download for TechExams community.