IPSEC VPN Issues
I am having issues with my IPSEC VPN not working. What I have boiled it down to is, it looks like when I try to send a ping from my computer to the firewall (B) using the internal interface IP on the the other side of the VPN. The firewall (A) I am behind does not forward the packet to the wan interface.
here is the flow trace filtered to the internal address of firewall (B). from the CLI of firewall (A)
The VPN appears to randomly stop working. Sometimes after a while it works.
id=20085 trace_id=25 func=print_pkt_detail line=5617 msg="vd-root:0 received a packet(proto=1, 10.0.0.83:1->10.2.0.254:2048) from internal. type=8, code=0, id=1, seq=18205."
id=20085 trace_id=25 func=init_ip_session_common line=5787 msg="allocate a new session-1d680973"
id=20085 trace_id=25 func=vf_ip_route_input_common line=2595 msg="find a route: flag=04000000 gw-10.2.0.254 via StG"
id=20085 trace_id=25 func=fw_forward_handler line=777 msg="Allowed by Policy-37:"
id=20085 trace_id=25 func=ipsecdev_hard_start_xmit line=788 msg="enter IPsec interface-StG"
id=20085 trace_id=25 func=esp_output4 line=927 msg="IPsec encrypt/auth"
id=20085 trace_id=25 func=ipsec_output_finish line=617 msg="send to 96.77.184.62 via intf-wan1"
Here is the flow trace to the external address for firewall (B) from the CLI of firewall (A). You can see that a ping directly to the external IP of Firewall (B) from a device behind firewall (A) works, but no Packets from the VPN appear to be exiting the WAN.
id=20085 trace_id=21 func=print_pkt_detail line=5617 msg="vd-root:0 received a packet(proto=1, 10.0.0.83:1->firewall B) from internal. type=8, code=0, id=1, seq=18200."
id=20085 trace_id=21 func=init_ip_session_common line=5787 msg="allocate a new session-1d67e3b6"
id=20085 trace_id=21 func=vf_ip_route_input_common line=2580 msg="Match policy routing id=2133131269: to 74.211.37.219 via ifindex-6"
id=20085 trace_id=21 func=vf_ip_route_input_common line=2595 msg="find a route: flag=04000000 gw-204.228.147.213 via wan2"
id=20085 trace_id=21 func=fw_forward_handler line=777 msg="Allowed by Policy-1: SNAT"
id=20085 trace_id=21 func=ids_receive line=289 msg="send to ips"
id=20085 trace_id=21 func=__ip_session_run_tuple line=3393 msg="SNAT 10.0.0.83->firewall A:60417"
id=20085 trace_id=22 func=print_pkt_detail line=5617 msg="vd-root:0 received a packet(proto=1, firewall B->firewall A:0) from wan2. type=0, code=0, id=60417, seq=18200."
id=20085 trace_id=22 func=resolve_ip_tuple_fast line=5697 msg="Find an existing session, id-1d67e3b6, reply direction"
id=20085 trace_id=22 func=__ip_session_run_tuple line=3407 msg="DNAT firewall A:0->10.0.0.83:1"
id=20085 trace_id=22 func=vf_ip_route_input_common line=2595 msg="find a route: flag=00000000 gw-10.0.0.83 via internal"
id=20085 trace_id=22 func=npu_handle_session44 line=1159 msg="Trying to offloading session from wan2 to internal, skb.npu_flag=00000000 ses.state=00012284 ses.npu_state=0x00001008"
id=20085 trace_id=22 func=fw_forward_dirty_handler line=399 msg="state=00012284, state2=00014001, npu_state=00001008"
id=20085 trace_id=22 func=ids_receive line=289 msg="send to ips"
Here is the flow filtered with the WAN address from firewall (A) in the CLI of firewall (B)
id=20085 trace_id=16 func=print_pkt_detail line=5824 msg="vd-root:0 received a packet(proto=1, Firewall (A):60417->Firewall (B):2048) from wan2. type=8, code=0, id=60417, seq=18206."
id=20085 trace_id=16 func=init_ip_session_common line=5995 msg="allocate a new session-00046253"
id=20085 trace_id=16 func=vf_ip_route_input_common line=2615 msg="find a route: flag=80000000 gw-74.211.37.219 via root"
id=20085 trace_id=17 func=print_pkt_detail line=5824 msg="vd-root:0 received a packet(proto=1, Firewall (B):60417->Firewall (A):0) from local. type=0, code=0, id=60417, seq=18206."
id=20085 trace_id=17 func=resolve_ip_tuple_fast line=5905 msg="Find an existing session, id-00046253, reply direction"
id=20085 trace_id=17 func=ipd_post_route_handler line=490 msg="out wan2 vwl_zone_id 0, state2 0x0, quality 0.
"