Configure Linux firewall rules from IOS XR to restrict traffic reaching Linux applications, allowing you to permit or deny traffic based on protocol, port, and ingress interface.
Use this procedure to configure traffic protection rules in IOS XR to control which traffic reaches Linux applications. Traffic protection provides a mechanism to configure Linux firewalls using IOS XR configuration, and applies rules based on any combination of remote address, local address, and ingress interface.
Any combination of remote address, local address, and ingress interface can be specified as rules to either allow or deny traffic. At least one parameter must be specified for a traffic protection rule to be valid.
Do not use both native Linux firewalls and IOS XR Linux traffic protection simultaneously. If traffic is received on a protocol or port combination with no traffic protection rules configured, all traffic is allowed by default.
Procedure
| 1. | Configure the traffic protection rule. The following example configures a rule that denies all TCP traffic on port 999 except traffic arriving on interface Example:
Key parameters in this command:
|
|
| 2. | Verify that the traffic protection rule is applied. Example:
The running configuration confirms that the traffic protection rule is active. TCP traffic on port 999 is denied by default, and traffic arriving on interface |
The traffic protection rule is configured and active. Linux applications receive only the traffic that is permitted by the defined rules, and all other traffic on the specified port is denied.