Firewall
The firewall capability is available using VPPACL Custom Resource since FPP 2.2.0.
VPPACL Custom Resources
To define Access Control List (ACL) rules, use the VPPACL Custom Resource (CR) that has the same fields as objects defined directly in VPP.
VPPACL Custom Resource consists of two arrays:
- rules
- bindings
VPPACL also contains a required label fpp-manager.cennso.com/plumbing-instance that must point to an Amberd instance.
The minimal VPPACL example looks as follows:
This rule denies all incoming traffic at the srv interface from IPs matching range 198.19.1.0/24 on an instance vpp-webserver.
The example iptables set:
The equivalent in VPPACL object:
Rules
Rules are used to match traffic with a certain pattern and perform a defined action. Each rule consists of an action and one or more optional parameters:
- action - Action to perform. The possible values are
deny,accept, andreflect. - addressFamily (optional) - Specifies the address family if it can't be deduced from the source or dest address
- dest (optional) - Destination Classless Inter-Domain Routing (CIDR)
- dstPort (optional) - Destination port range
- protocol (optional) - Defines the protocol. The possible values are
tcp,udp,sctp,icmp, andicmp6. - source (optional) - Source CIDR
- srcPort (optional) - Source port range
Source and destination port ranges are defined in the format of 1234-1235.
CIDR addresses are defined in the formats of 192.168.0.0/24 or 2001:4860:4860::8888/32.
Bindings
Before rules can start matching traffic, they must be bound to an interface. Bindings are a list of interfaces to which all the above rules will be applied.
Each element consists of those parameters:
- ifName - Interface name as specified in the VPPInterface CR
- direction - Applies the rules to the incoming traffic (
input) or outgoing traffic (output)
CLI
Caution
This approach does not allow strict control over ACL identification.
Caution
Using VPPACL CR makes this section obsolete. However, it still may be used for debugging purposes on interfaces not managed by FPP.
Caution
ACLs defined for VPPInterfaces are removed by FPP.
The vppcli creation command looks as follows:
ACL Index used for later assignment to the input or output traffic is returned in CLI.
Normally, ACLs are indexed as positive numbers, starting from 0. So if there are no ACLs on the running VPP instance, the first created ACL will be indexed as 0. If the next ACL is created, it most likely will have ACL Index 1.
Attaching ACLs to a specific interface and detaching them is done through the following command:
FPP VPPConfig
Caution
Using VPPACL CR makes this section obsolete. However, it still may be used for debugging purposes on interfaces not managed by FPP.
Caution
ACLs defined for VPPInterfaces are removed by FPP.
The following set of iptables commands is replicated by the VPPConfig spec:
ICMP is currently not supported by CLI, please refer to the Limitations section.
If no ACLs are assigned to the interface, all traffic will be accepted. There is no need to put extra rules per interface.
The specific interface/proto/destination can be specified as:
VRRP ACL example
Note
VPP does not support protocol identification such as IPTables, see the Limitations section.)
Drop specific network
Limitations
- VPP CLI does not give any control of ACL indexing.
- VPP ACLs cover only TCP/UDP/ICMP L4 protocols and only TCP/UDP through CLI.