Steps for F5 Configuration
We choose in our example “10.2.3.169” to be for management F5 and 10.2.3.118 to be for Load Balancing. Both IPs on the same interface, this means we will have only one NIC associated with this F5, where “10.2.3.169” is primary private ip and “10.2.3.118” is a secondary private ip.
1. Add Nodes
Login to our F5 interface https://10.2.3.169:8443/ then go to the “Local Traffic” → “Nodes”, here we need to click on “Create” (located in the right side).
Node 1:
![](../../__attachments/3555098678/NODE1.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
Node 2
![](../../__attachments/3555098678/node2.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
At the end in Local Traffic → Nodes , we need to have:
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2012.43.19.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
2. Create Pools
Go in “Local Traffic” → “Pools” and here press “create” button (located in the right side).
2.1 Pool for bops
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2012.48.29.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
2.2. Pool for dmz
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2012.50.19.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
2.3. Pool for idp
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2012.51.47.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
2.3. Pool for ssp
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2012.55.04.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
2.3. Pool for websec admin
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2012.56.08.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
2.4. At the end we need to have
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2012.57.21.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
3. Create two IRules
!!! Before we create the following rules we need to get the “x-ssl-termination-proxy-secret” from haproxy located the webapp. ( /etc/veridiumid/haproxy/haproxy.cfg ) , and we need to replace XXXXXXXXX with our x-ssl-termination-proxy-secret.
Go in “Local Traffic” → “iRules” and here press “create” button (located in the right side).
3.1. Rule 1
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.05.16.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
###Retrieve the client certificate DN
when CLIENTSSL_CLIENTHELLO {
set dist_name ""
}
###Create the Headers to insert the proxy secret and the client certificate DN.
when HTTP_REQUEST {
set dist_name [X509::subject [SSL::cert 0]]
HTTP::header insert "x-ssl-termination-proxy-secret" "pDXXgTsfGZOCwWn"
HTTP::header insert "X-SSL-Client-DN" $dist_name
#log local0. "HERE START"
#log local0. "$dist_name"
#log local0. "HERE END"
}
3.2. Rule 2
![](../../__attachments/3555098678/Screenshot%202022-12-02%20at%2013.36.09.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
###Retrieve the client certificate DN
when CLIENTSSL_CLIENTHELLO {
set dist_name ""
}
when CLIENTSSL_CLIENTCERT {
if {[SSL::cert count] > 0} {
set dist_name [X509::subject [SSL::cert 0]]
log local0. "$dist_name"
}
}
###Create the Headers to insert the proxy secret and the client certificate DN.
when HTTP_REQUEST {
log local0. "$dist_name"
HTTP::header insert "x-ssl-termination-proxy-secret" "fGQazLDRzYBfiKQ"
if { $dist_name != ""} {
HTTP::header insert "X-SSL-Client-DN" $dist_name
}
if { [HTTP::cookie exists "JSESSIONID"] } {
persist uie [HTTP::cookie "JSESSIONID"]
}
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
persist add uie [HTTP::cookie "JSESSIONID"]
}
}
4. Add the Certificates, your service prefered certificate and client-ca.pem from Veridium Server (in our case will be *.veridium-dev.com + the client-ca).
The certificates are located in the WEBAPP in
/etc/veridiumid/haproxy/server.pem for *.veridium-dev.com
/etc/veridiumid/haproxy/client-ca.pem for client-ca
4.1. Add the “RSA Certificate & Key” for wildcard certificate in F5
Go to “System” → “Certificate Management” → “Traffic Certificate Management” → “SSL Certificate List” and click to the “IMPORT” button (located in the right side).
Our file is /etc/veridiumid/haproxy/server.pem, but we need to have the following format:
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.31.33.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
At the end we need to have something like this:
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.36.47.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
4.2. Add the “Certificate Bundle“
Go to “System” → “Certificate Management” → “Traffic Certificate Management” → “SSL Certificate List” and click to the “IMPORT” button (located in the right side).
Our file is /etc/veridiumid/haproxy/client-ca.pem but we need to have the following format:
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.32.31.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
5. SSL Profiles
5.1. Profile for SSL Client
Go to “Local Traffic” → “Profiles” → “SSL” → Client and here we need to create 3 profiles:
5.1.1. Profile wildcard.veridium-dev.com
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.39.45.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.40.20.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.40.44.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
5.1.2. Profile wildcard.veridium-dev.com-client-ca
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.42.23.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.42.36.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.40.44.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
5.1.3. Profile wildcard.veridium-dev.com-client-ca-opt
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.43.32.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.43.42.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.40.44.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
5.1. Profile for SSL Server
Go to “Local Traffic” → “Profiles” → “SSL” → Server and here we need to create 1 profile:
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.46.43.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.46.54.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.47.01.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
6. SSL Profiles
6.1. Profile for HTTP Profile Client
Go to “Local Traffic” → “Profiles” → “Services” and here we need to create profile “http_reverse“
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.53.38.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2013.54.15.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
6. Policies
Go to “Local Traffic” → “Policies” → “Policy List” and here we need to create the following:
6.1. Policy dev9-webapp-dmz
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2014.56.26.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
6.2. Policy dev9-webapp-idp
![](../../__attachments/3555098678/Screenshot%202022-09-22%20at%2010.56.32.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
6.3. Policy dev9-webapp-ssp
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2014.59.13.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
6.4. Policy dev9-webapp-websec-admin
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2014.59.48.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
6.5. Policy dev9-webapp-host
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.00.49.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
Remember!!! After we create a rule we need to publish it. Go in “Local Traffic” → Policies → in the section “Draft Policies“ select the policies/policy and press “Publish”. At the end you will have:
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.04.28.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
7. Virtual Servers
Go to “Local Traffic” → “Virtual Servers” and here we need to create the following virtual servers:
7.1. Virtual Server “webapp-bops“
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.11.27.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.11.37.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.11.49.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
7.2. Virtual Server “webapp-dmz“
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.11.49.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.14.41.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.15.00.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
7.3. Virtual Server “webapp-idp“
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.17.51.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.18.02.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.18.12.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
7.4. Virtual Server “webapp-ssp“
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.20.57.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.21.05.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.21.14.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
7.5. Virtual Server “webapp-websec-admin“
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.23.47.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.23.57.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.24.13.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)
7.5. Virtual Servers List
At the end we need to have:
![](../../__attachments/3555098678/Screenshot%202022-09-21%20at%2015.26.23.png?inst-v=ffa2d127-74f7-4a38-ac00-bc62b4eb8eb4)