F5 BIG-IP security baseline
Rules for the basics every BIG-IP should have, plus two checks that run on every virtual server. They come from the bigip-security-baseline policy template.
Every example on this page was checked with rConfig Pro's policy engine on Each of the 15 configs below was run through rConfig Pro’s evaluator with the rule above it, and gave the result shown. Configs from a sample are sanitised excerpts. Cards marked written for this page cover objects no sample has.
All the rules come from bigip-security-baseline.policy in the policy templates (v1.5.0). Import the whole file with Import Templates (see importing a policy template), or copy one rule into your own definition. The F5 BIG-IP templates page lists the file’s known limitations. Run the rules against the tmsh configuration in brace format.
| Rule | Method | Since |
|---|---|---|
| NTP, syslog and SNMP are set up | must_match_all_from_array |
8.0.0 |
| An NTP object exists | wildcard_match_single_string |
8.0.0 |
| No public or private SNMP community | evaluate_block |
8.3.0 |
| SSH idle timeout | evaluate_block |
8.3.0 |
| Remote syslog | evaluate_block |
8.3.0 |
| WAF logging on every WAF virtual server | evaluate_block |
8.3.0 |
| WAF policy on every external virtual server | evaluate_block |
8.3.0 |
NTP, syslog and SNMP are set up
A BIG-IP needs the right time, a place to send logs and a way to be monitored. This rule passes when the config has sys ntp, sys syslog and sys snmp objects. It checks that they exist, not what is in them.
// F5: Core services are configured (NTP, syslog, SNMP objects present)#[must_match_all_from_array]sys ntpsys syslogsys snmpsys ntp { servers { 192.0.2.10 192.0.2.11 }}sys snmp { sys-contact noc@example.net sys-location "Example site"}sys syslog { remote-servers { remote1 { host 192.0.2.50 } }}Why: All three objects are there.
ltm virtual /Common/vs_plain_http { destination /Common/192.0.2.12:80 ip-protocol tcp profiles { /Common/http { } /Common/tcp { } } source 0.0.0.0/0}Why: This config has virtual servers only. There is no sys ntp, sys syslog or sys snmp object.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from TMOS (lab sample) and TMOS (written for this page). Minimum rConfig 8.0.0 (must_match_all_from_array). Editions: Pro, Vector, Enterprise.
An NTP object exists
Logs are only useful if their times are right. This rule passes when there is a sys ntp object. The * matches whatever follows it on the line.
// F5: An NTP object exists for accurate log timestamps#[wildcard_match_single_string]sys ntp *sys ntp { servers { 192.0.2.10 192.0.2.11 }}Why: A sys ntp object is there.
ltm virtual /Common/vs_internal_b { destination /Common/192.0.2.9:8080 profiles { /Common/tcp { } } source 192.0.2.0/24}Why: There is no sys ntp object.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from TMOS (lab sample) and TMOS (written for this page). Minimum rConfig 8.0.0 (wildcard_match_single_string). Editions: Pro, Vector, Enterprise.
No public or private SNMP community
public and private are the community names every scanner tries first. This rule fails if any community-name is public or private, anywhere in the config.
// F5: No default or public/private SNMP community strings anywhere#[evaluate_block]not: any: - community-name public - community-name privatesys snmp { communities { /Common/snmp-ro { community-name EXAMPLECOMM source 192.0.2.0/24 } }}Why: The only community has a name of its own.
sys snmp { communities { /Common/comm-public { community-name public source default } }}Why: community-name public is the default community.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from TMOS (written for this page). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
SSH idle timeout
An SSH session left open is an open door. This rule checks the sys sshd object and needs an inactivity-timeout that starts with 1 to 9, so 0 (no timeout) fails. A config with no sys sshd object fails too.
// F5: The SSH daemon enforces a non-zero idle timeout#[evaluate_block]scope: ^sys sshdall: - "re:inactivity-timeout [1-9]"sys sshd { inactivity-timeout 900}Why: Idle sessions close after 900 seconds.
sys sshd { inactivity-timeout 0}Why: 0 means sessions never time out. The result names sys sshd.
ltm virtual /Common/vs_internal_b { destination /Common/192.0.2.9:8080 profiles { /Common/tcp { } } source 192.0.2.0/24}Why: There is no sys sshd object, so the rule has nothing to check and fails.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config 1 | fail | FAIL |
| Failing config 2 | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from TMOS (lab sample) and TMOS (written for this page). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Remote syslog
Logs kept only on the box are lost if it fails, and an attacker on the box can delete them. This rule checks the sys syslog object for a remote-servers entry.
// F5: Remote syslog is configured (logs leave the box)#[evaluate_block]scope: ^sys syslogall: - remote-serverssys syslog { remote-servers { remote1 { host 192.0.2.50 } }}Why: Logs go to 192.0.2.50.
ltm virtual /Common/vs_plain_http { destination /Common/192.0.2.12:80 ip-protocol tcp profiles { /Common/http { } /Common/tcp { } } source 0.0.0.0/0}Why: There is no sys syslog object, so the rule has nothing to check and fails.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from TMOS (lab sample) and TMOS (written for this page). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
WAF logging on every WAF virtual server
A WAF that blocks attacks but logs nothing gives you no evidence. This rule checks every ltm virtual on its own. A virtual server is fine if it is disabled, has no WAF policy, or has all four log profiles.
// F5 WAF logging: WAF-enabled virtual servers carry the required security-log-profiles (disabled servers skipped)#[evaluate_block]scope: ^ltm virtualany: - equals: disabled - not: ASM_WAF_ - all: - siem_log_collector - netlog_tcp - Log illegal requests - telemetry_asm_security_log_profileltm virtual /Common/vs_secure_a { destination /Common/192.0.2.10:443 profiles { /Common/ASM_WAF_policy_prod { } /Common/siem_log_collector { } /Common/netlog_tcp { } /Common/telemetry_asm_security_log_profile { } } security-log-profiles { /Common/Log illegal requests } source 0.0.0.0/0}ltm virtual /Common/vs_internal_b { destination /Common/192.0.2.9:8080 profiles { /Common/tcp { } } source 192.0.2.0/24}ltm virtual /Common/vs_disabled_c { destination /Common/192.0.2.99:443 disabled profiles { /Common/tcp { } } source 0.0.0.0/0}Why: vs_secure_a has all four profiles, vs_internal_b has no WAF policy, and vs_disabled_c is disabled.
ltm virtual /Common/vs_app_missing_logging { destination /Common/192.0.2.11:443 ip-protocol tcp profiles { /Common/ASM_waf_policy_prod { context clientside } /Common/netlog_tcp { } /Common/tcp { } } source 0.0.0.0/0}Why: It has a WAF policy but only one of the four log profiles. The result names ltm virtual /Common/vs_app_missing_logging.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from TMOS (lab sample). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
WAF policy on every external virtual server
A virtual server that anyone on the internet can reach should have a WAF in front of it. This rule checks every ltm virtual. It is fine if it is disabled, is not open to 0.0.0.0/0, or has a WAF policy.
// F5 WAF on external servers: externally reachable virtual servers have a WAF policy (disabled servers skipped)#[evaluate_block]scope: ^ltm virtualany: - equals: disabled - not: source 0.0.0.0/0 - ASM_WAF_ltm virtual /Common/vs_secure_a { destination /Common/192.0.2.10:443 profiles { /Common/ASM_WAF_policy_prod { } /Common/siem_log_collector { } /Common/netlog_tcp { } /Common/telemetry_asm_security_log_profile { } } security-log-profiles { /Common/Log illegal requests } source 0.0.0.0/0}ltm virtual /Common/vs_internal_b { destination /Common/192.0.2.9:8080 profiles { /Common/tcp { } } source 192.0.2.0/24}Why: vs_secure_a is open to the internet and has a WAF policy. vs_internal_b is internal only.
ltm virtual /Common/vs_plain_http { destination /Common/192.0.2.12:80 ip-protocol tcp profiles { /Common/http { } /Common/tcp { } } source 0.0.0.0/0}Why: It is open to 0.0.0.0/0 and has no WAF policy. The result names ltm virtual /Common/vs_plain_http.
Expected result in rConfig, with this rule as the only rule in a definition:
| Config | Rule result | Overall result |
|---|---|---|
| Passing config | pass | PASS |
| Failing config | fail | FAIL |
Framework mapping. The rule provides evidence towards these controls. It does not certify anything.
| Framework | Reference |
|---|---|
| None recorded | See Compliance frameworks |
Tested with: sample excerpts from TMOS (lab sample). Minimum rConfig 8.3.0 (evaluate_block). Editions: Pro, Vector, Enterprise.
Related reference
- F5 BIG-IP policy templates: every rule in
bigip-security-baseline.policy, its references and known limitations. - Policy Definitions: the definition file format and every method.
- Policy Assignments: run a definition against your devices.
- Policy Compliance Results: read the pass and fail results.