This article explains why FBF does not work for FTP when ALG is enabled.
The parent session of ALG-based FTP traffic can be controlled according to the configured FBF, but the child session of ALG-based FTP traffic cannot be controlled according to the configured FBF. This issue is described in the example below.
root@SRX1400-A# show firewall filter test1 { term 0 { from { destination-address { 192.168.2.120/32; } } then { routing-instance test1; } } term 1 { then accept; } }
root@SRX1400-A# show routing-instances test1 { instance-type forwarding; routing-options { static { route 0.0.0.0/0 next-hop 192.168.3.2; <<<<< Default route in "test1" routing-instance } } }
root@SRX1400-A# show routing-options interface-routes { rib-group inet rg-test1; } static { route 0.0.0.0/0 next-hop 192.168.3.3; <<<<< Default Route in "inet.0" routing-instance } rib-groups { rg-test1 { import-rib [ inet.0 test1.inet.0 ]; } }
The FTP Parent session and Child session go through different routes because they use different route tables to look up the route for the destination prefix, as explained below.
FTP parent session: vr_id is 5 Apr 7 15:14:39 15:14:38.889531:CID-00:FPC-01:PIC-00:THREAD_ID-21:RT:flow_first_routing: vr_id 5, call flow_route_lookup(): src_ip 192.168.1.10, x_dst_ip 192.168.2.120, in ifp ge-0/0/0.0, out ifp N/A sp 2447, dp 21, ip_proto 6, tos 0 FTP child session: vr_id is 0 Apr 7 15:14:40 15:14:40.027635:CID-00:FPC-01:PIC-00:THREAD_ID-22:RT:asl_usp_get_l3_out_ifp_out_tunnel ASL IPV4 out_ifp = ge-0/0/1.0 for dst:192.168.2.120 in vr_id:0
[flowd64]FPC1.PIC0(vty)# show route ip prefix 192.168.2.120 IPv4 Route Table 0, default.0, 0x0: Destination NH IP Addr Type NH ID Interface ------------ --------------- -------- ----- --------- default 192.168.3.3 Unicast 577 RT-ifl 0 ge-0/0/1.0 ifl 73 IPv4 Route Table 5, test1.5, 0x0: Destination NH IP Addr Type NH ID Interface ------------ --------------- -------- ----- --------- default 192.168.3.2 Unicast 578 RT-ifl 0 ge-0/0/1.0 ifl 73
SRX does not support the ALG+FBF scenario described above (the sharing of one outgoing interface). Alternative solutions:
OR