Configure F5 TLS (SSL) Cipher String

The list of TLS ciphers is changing quite rapidly, old ciphers are considered insecure, and new ciphers are added.

When you configure a virtual server on an F5 you can add a TLS client profile, which means F5 is doing TLS to the client. I think this is a bit misleading because with “SSL client profile” you are actually configuring a TLS server.

You have to make your own SSL client profile, to add your key and certificate to the profile. You can do that at:
Local Traffic – Profiles – SSL – Client

When you change to Advanced Configuration you can change the “Ciphers” string. This setting changes the list of allowed ciphers and it’s order. You might want to change this for better security or to get a higher rating at https://ssllabs.com .

The default setting is “DEFAULT”. This translates to a longer string. For 12.1.1 it’s

!SSLv2:!EXPORT:DHE+AES-GCM:DHE+AES:DHE+3DES:RSA+AES-GCM:RSA+AES:RSA+3DES:ECDHE+AES-GCM:ECDHE+AES:ECDHE+3DES:-MD5:-SSLv3:-RC4

This list translates to the following ciphers:

 ID SUITE BITS PROT METHOD CIPHER MAC KEYX
 0: 159 DHE-RSA-AES256-GCM-SHA384 256 TLS1.2 Native AES-GCM SHA384 EDH/RSA 
 1: 158 DHE-RSA-AES128-GCM-SHA256 128 TLS1.2 Native AES-GCM SHA256 EDH/RSA 
 2: 107 DHE-RSA-AES256-SHA256 256 TLS1.2 Native AES SHA256 EDH/RSA 
 3: 57 DHE-RSA-AES256-SHA 256 TLS1 Native AES SHA EDH/RSA 
 4: 57 DHE-RSA-AES256-SHA 256 TLS1.1 Native AES SHA EDH/RSA 
 5: 57 DHE-RSA-AES256-SHA 256 TLS1.2 Native AES SHA EDH/RSA 
 6: 57 DHE-RSA-AES256-SHA 256 DTLS1 Native AES SHA EDH/RSA 
 7: 103 DHE-RSA-AES128-SHA256 128 TLS1.2 Native AES SHA256 EDH/RSA 
 8: 51 DHE-RSA-AES128-SHA 128 TLS1 Native AES SHA EDH/RSA 
 9: 51 DHE-RSA-AES128-SHA 128 TLS1.1 Native AES SHA EDH/RSA 
10: 51 DHE-RSA-AES128-SHA 128 TLS1.2 Native AES SHA EDH/RSA 
11: 51 DHE-RSA-AES128-SHA 128 DTLS1 Native AES SHA EDH/RSA 
12: 22 DHE-RSA-DES-CBC3-SHA 168 TLS1 Native DES SHA EDH/RSA 
13: 22 DHE-RSA-DES-CBC3-SHA 168 TLS1.1 Native DES SHA EDH/RSA 
14: 22 DHE-RSA-DES-CBC3-SHA 168 TLS1.2 Native DES SHA EDH/RSA 
15: 22 DHE-RSA-DES-CBC3-SHA 168 DTLS1 Native DES SHA EDH/RSA 
16: 157 AES256-GCM-SHA384 256 TLS1.2 Native AES-GCM SHA384 RSA 
17: 156 AES128-GCM-SHA256 128 TLS1.2 Native AES-GCM SHA256 RSA 
18: 61 AES256-SHA256 256 TLS1.2 Native AES SHA256 RSA 
19: 53 AES256-SHA 256 TLS1 Native AES SHA RSA 
20: 53 AES256-SHA 256 TLS1.1 Native AES SHA RSA 
21: 53 AES256-SHA 256 TLS1.2 Native AES SHA RSA 
22: 53 AES256-SHA 256 DTLS1 Native AES SHA RSA 
23: 60 AES128-SHA256 128 TLS1.2 Native AES SHA256 RSA 
24: 47 AES128-SHA 128 TLS1 Native AES SHA RSA 
25: 47 AES128-SHA 128 TLS1.1 Native AES SHA RSA 
26: 47 AES128-SHA 128 TLS1.2 Native AES SHA RSA 
27: 47 AES128-SHA 128 DTLS1 Native AES SHA RSA 
28: 10 DES-CBC3-SHA 168 TLS1 Native DES SHA RSA 
29: 10 DES-CBC3-SHA 168 TLS1.1 Native DES SHA RSA 
30: 10 DES-CBC3-SHA 168 TLS1.2 Native DES SHA RSA 
31: 10 DES-CBC3-SHA 168 DTLS1 Native DES SHA RSA 
32: 49200 ECDHE-RSA-AES256-GCM-SHA384 256 TLS1.2 Native AES-GCM SHA384 ECDHE_RSA 
33: 49199 ECDHE-RSA-AES128-GCM-SHA256 128 TLS1.2 Native AES-GCM SHA256 ECDHE_RSA 
34: 49192 ECDHE-RSA-AES256-SHA384 256 TLS1.2 Native AES SHA384 ECDHE_RSA 
35: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1 Native AES SHA ECDHE_RSA 
36: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1.1 Native AES SHA ECDHE_RSA 
37: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1.2 Native AES SHA ECDHE_RSA 
38: 49191 ECDHE-RSA-AES128-SHA256 128 TLS1.2 Native AES SHA256 ECDHE_RSA 
39: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1 Native AES SHA ECDHE_RSA 
40: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1.1 Native AES SHA ECDHE_RSA 
41: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1.2 Native AES SHA ECDHE_RSA 
42: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1 Native DES SHA ECDHE_RSA 
43: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1.1 Native DES SHA ECDHE_RSA 
44: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1.2 Native DES SHA ECDHE_RSA 

Example:

Currently Diffie-Hellman 1024 is considered insecure so you want to change the cipher string. You can use this to disable DHE:

!DHE:DEFAULT

You can check the resulting cipher list before applying the change from the console:

 # tmm --clientciphers '!DHE:DEFAULT'
 ID SUITE BITS PROT METHOD CIPHER MAC KEYX
 0: 157 AES256-GCM-SHA384 256 TLS1.2 Native AES-GCM SHA384 RSA 
 1: 156 AES128-GCM-SHA256 128 TLS1.2 Native AES-GCM SHA256 RSA 
 2: 61 AES256-SHA256 256 TLS1.2 Native AES SHA256 RSA 
 3: 53 AES256-SHA 256 TLS1 Native AES SHA RSA 
 4: 53 AES256-SHA 256 TLS1.1 Native AES SHA RSA 
 5: 53 AES256-SHA 256 TLS1.2 Native AES SHA RSA 
 6: 53 AES256-SHA 256 DTLS1 Native AES SHA RSA 
 7: 60 AES128-SHA256 128 TLS1.2 Native AES SHA256 RSA 
 8: 47 AES128-SHA 128 TLS1 Native AES SHA RSA 
 9: 47 AES128-SHA 128 TLS1.1 Native AES SHA RSA 
10: 47 AES128-SHA 128 TLS1.2 Native AES SHA RSA 
11: 47 AES128-SHA 128 DTLS1 Native AES SHA RSA 
12: 10 DES-CBC3-SHA 168 TLS1 Native DES SHA RSA 
13: 10 DES-CBC3-SHA 168 TLS1.1 Native DES SHA RSA 
14: 10 DES-CBC3-SHA 168 TLS1.2 Native DES SHA RSA 
15: 10 DES-CBC3-SHA 168 DTLS1 Native DES SHA RSA 
16: 49200 ECDHE-RSA-AES256-GCM-SHA384 256 TLS1.2 Native AES-GCM SHA384 ECDHE_RSA 
17: 49199 ECDHE-RSA-AES128-GCM-SHA256 128 TLS1.2 Native AES-GCM SHA256 ECDHE_RSA 
18: 49192 ECDHE-RSA-AES256-SHA384 256 TLS1.2 Native AES SHA384 ECDHE_RSA 
19: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1 Native AES SHA ECDHE_RSA 
20: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1.1 Native AES SHA ECDHE_RSA 
21: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1.2 Native AES SHA ECDHE_RSA 
22: 49191 ECDHE-RSA-AES128-SHA256 128 TLS1.2 Native AES SHA256 ECDHE_RSA 
23: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1 Native AES SHA ECDHE_RSA 
24: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1.1 Native AES SHA ECDHE_RSA 
25: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1.2 Native AES SHA ECDHE_RSA 
26: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1 Native DES SHA ECDHE_RSA 
27: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1.1 Native DES SHA ECDHE_RSA 
28: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1.2 Native DES SHA ECDHE_RSA

The cipher string “!DHE:DEFAULT” results in A- grade at ssllabs. The reason for minus A is:

“The server does not support Forward Secrecy with the reference browsers. Grade reduced to A-”

If you want to give priority to the “Forward Secrecy” ciphers and lower priotirty to 3DES, your can change the cipher string to

-3DES:ECDHE:!DHE:DEFAULT
 # tmm --clientciphers '-3DES:ECDHE:!DHE:DEFAULT'
 ID SUITE BITS PROT METHOD CIPHER MAC KEYX
 0: 49200 ECDHE-RSA-AES256-GCM-SHA384 256 TLS1.2 Native AES-GCM SHA384 ECDHE_RSA 
 1: 49192 ECDHE-RSA-AES256-SHA384 256 TLS1.2 Native AES SHA384 ECDHE_RSA 
 2: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1 Native AES SHA ECDHE_RSA 
 3: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1.1 Native AES SHA ECDHE_RSA 
 4: 49172 ECDHE-RSA-AES256-CBC-SHA 256 TLS1.2 Native AES SHA ECDHE_RSA 
 5: 49199 ECDHE-RSA-AES128-GCM-SHA256 128 TLS1.2 Native AES-GCM SHA256 ECDHE_RSA 
 6: 49191 ECDHE-RSA-AES128-SHA256 128 TLS1.2 Native AES SHA256 ECDHE_RSA 
 7: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1 Native AES SHA ECDHE_RSA 
 8: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1.1 Native AES SHA ECDHE_RSA 
 9: 49171 ECDHE-RSA-AES128-CBC-SHA 128 TLS1.2 Native AES SHA ECDHE_RSA 
10: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1 Native DES SHA ECDHE_RSA 
11: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1.1 Native DES SHA ECDHE_RSA 
12: 49170 ECDHE-RSA-DES-CBC3-SHA 168 TLS1.2 Native DES SHA ECDHE_RSA 
13: 157 AES256-GCM-SHA384 256 TLS1.2 Native AES-GCM SHA384 RSA 
14: 156 AES128-GCM-SHA256 128 TLS1.2 Native AES-GCM SHA256 RSA 
15: 61 AES256-SHA256 256 TLS1.2 Native AES SHA256 RSA 
16: 53 AES256-SHA 256 TLS1 Native AES SHA RSA 
17: 53 AES256-SHA 256 TLS1.1 Native AES SHA RSA 
18: 53 AES256-SHA 256 TLS1.2 Native AES SHA RSA 
19: 53 AES256-SHA 256 DTLS1 Native AES SHA RSA 
20: 60 AES128-SHA256 128 TLS1.2 Native AES SHA256 RSA 
21: 47 AES128-SHA 128 TLS1 Native AES SHA RSA 
22: 47 AES128-SHA 128 TLS1.1 Native AES SHA RSA 
23: 47 AES128-SHA 128 TLS1.2 Native AES SHA RSA 
24: 47 AES128-SHA 128 DTLS1 Native AES SHA RSA 
25: 10 DES-CBC3-SHA 168 TLS1 Native DES SHA RSA 
26: 10 DES-CBC3-SHA 168 TLS1.1 Native DES SHA RSA 
27: 10 DES-CBC3-SHA 168 TLS1.2 Native DES SHA RSA 
28: 10 DES-CBC3-SHA 168 DTLS1 Native DES SHA RSA

This string moves the ECDHE ciphers to a higher priority, and 3DES moves down. The result is “Grade A” or “A+”.

But be carefull. Better cipher often means worse performance. Depending on your hardware “ECDHE-RSA-AES128-GCM-SHA256” may be 3 times slower than “AES128-GCM-SHA256”.

Links: https://support.f5.com/csp/article/K17370 https://ssllabs.com

 

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

Check Raid Status for Dell Raids on Linux

Linux support from dell is still very poor. They still support only RedHat$ and SuSE$.

But there are ways to check the Raid status of Dell server on debian. http://hwraid.le-vert.net/ is doing a good job in collecting information and building Debian style packages.

Example: 

A Dell server “PowerEdge T130” with “LSI Logic / Symbios Logic MegaRAID SAS-3 3008”  also called “PERC H330” running Debian 8.7.

The kernel uses the megaraid_sas driver. At http://hwraid.le-vert.net/debian/pool-jessie you can find a package called “megacli_8.07.14-1_amd64.deb”

You can check your raid status with:

megacli -LDInfo -Lall -a0

or add this to your crontab file, to receive mails when not all raids are in “optimal” state:

7 * * * *    /usr/sbinmegacli -LDInfo -Lall -a0 | grep “^State” | grep -v ” Optimal$”

 

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

PaloAlto Packet Loss of 1% and More

Problem: PaloAlto firewall is dropping packets in small bursts of some seconds, and sometimes it drops TCP connections. It only happens on HA clusters on interfaces in active/passive (fail over) mode.

Solution: disable the following check box in the Ethernet interface Advanced – LLDP settings: “Enable in HA Passive State”

Discussion: Palo Alto uses only one MAC address for both machines of an HA cluster. The passive box sends LLDP packets using this MAC address. The switch learns this MAC address and sends the traffic to the passive node until the active node sends new packets. The passive node should never send packets with the MAC address of the active node, and should have its own MAC address for LLDP and possibly other services.

Version: PaloAlto current version of Nov 2016, connected to a Cisco Catalyst 6500

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

ARP is not working on Cisco ASR 1001 X

Problem: Cisco ASR router is loosing connectivity to its directly attached Ethernet neighbors. In this situation interface status is still up, packets are going in and out on both ends, even IPv6 was still working. The actual problem was that the Cisco ASR was ignoring all ARP responses from its neighbors and the ARP table to this interface was empty. Later the same happened on a second interface.

A temporary work around was to reboot the router.

Solution: Cisco support suggested a software upgrade, even though the software was only some weeks old. After the software upgrade the error didn’t happen again until now.
The old IOS version was: asr1001x-universalk9.03.16.03.S.155-3.S3-ext.SPA.bin
The new IOS version is: asr1001x-universalk9.03.16.04a.S.155-3.S4a-ext.SPA.bin

The only fix that possibly fits to the problem is:

https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20160804-wedge

“A remote attacker can cause an interface wedge and an eventual denial of service condition”

What’s an “interface wedge”. Cisco bug reports were more precise years ago.

 

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

Cups PDF Filter Crashes

Problem: for some PDF files cups does not print the page, the web gui just tells “filter failed” and in the cups logfile you find

[Job 528] PID 19521 (gs) crashed on signal 11!

Discussion: cups on debian uses ghostscript as pdf renderer. The pdf renderer of ghostsciprt crashes on many files. You can test by simply running pdf2ps on the pdf file, and see if it is the same for you.

Solution: you can configure the pdf renderer that cups should use. I changed it to pdftops from the “poppler-utils” package.

Install “poppler-utils” using aptitude or apt-get and add the following line to /etc/cups/printers.conf in the printer section:

Option pdftops-renderer pdftops

Versions: debian-8.6 with ghostscript 9.06~dfsg-2+deb8u1 and cups 1.7.5-11+deb8u1

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

Autosave for VIM

I believe that it’s a good idea that vi does not auto save during editing. Think of config files or src files that should never be in an inconsistent state. The programmer or sysadmin should decide when he wants to save data.

But sometime auto save is handy, while typing lists like todo lists or outlines etc. Every version is OK and you don’t want to save after every change and still don’t want to loos data on connection or power loss.

Use this in you current VIM session to make this current buffer autosave:

:au TextChanged,TextChangedI <buffer> silent w
Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

Annoyances while updating F5

I had to upgrade several F5 load balancers from 11.5 to 12.1 in the last weeks. Usually updating F5 is quiet easy, but there are bugs or annoyances you should know:

  1. Sometimes F5 asks for re-activating after the first boot into the new version. It seems that you have to install the new version in a specific order to prevent this: BIGIP-Firmware, licence re-activate, BIGIP-Hotfix, Restart.
    Remember the appliance has to be in stand by mode when re-activating the licence.
  2. If the F5 asks for licence re-activation after reboot, it should be easy to re-activate. But even after licence activation, F5 is not working correctly. The SNMP MIB for LTM is not complete. You have to reboot again to activate the LTM SNMP MIB tree again.
  3. When switching from 11.5 to 12.1 the SNMP MIB changed. Serious manufactures that special care to keep the SNMP stable and compatible. F5 doesn’t they changed data types from 11.5 to 12.1 which means you have to update the MIB database. On the other hand if you do, you cannot query those OIDs from older machines. That’s why other manufactures never change data type, The correct way is to add new OIDs wait some years and deprecate the old OID. F5 doesn’t. Here’s a diff part of mibs_f5/F5-BIGIP-LOCAL-MIB.txt:
    - ltmNodeAddrStatCurSessions Gauge,
    - ltmNodeAddrStatCurrentConnsPerSec Gauge,
    - ltmNodeAddrStatDurationRateExceeded Gauge
    + ltmNodeAddrStatCurSessions CounterBasedGauge64,
    + ltmNodeAddrStatCurrentConnsPerSec CounterBasedGauge64,
    + ltmNodeAddrStatDurationRateExceeded CounterBasedGauge64
  4. Beside this breaking incompatibility between 11.5 and 12.1, they also changed some value names, which breaks software that used these names. This is not a bug but still annoying. Remember: an API has to be stable and backward compatible.
     inband(2),
    - forcedUp(3),
    + forced-up(3),
     up(4),
     down(19),
    - forcedDown(20),
    - iruleDown(22),
    - inbandDown(23),
    - downManualResume(24),
    + forced-down(20),
    + irule-down(22),
    + inband-down(23),
    + down-manual-resume(24),
     disabled(25)

Versions: F5 LTM 11.5.1, 11.5.3 and 12.1.1

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

Rare Connection Resets after Linux Upgrade

Problem: after upgrading from Debian 6 to Debian 8 some of the machines lose their ethernet network connection under heavy load for some seconds rarely. You find lines like these in syslog:

[2333099.217735] NETDEV WATCHDOG: eth1 (tg3): transmit queue 0 timed out
[2333099.217966] tg3 0000:03:04.1 eth1: transmit timed out, resetting
[2333099.384391] tg3 0000:03:04.1 eth1: 0: Host status block [00000001:0000003c:(0000:0018:0000):(0018:01e9)]
[2333099.386091] tg3 0000:03:04.1 eth1: 0: NAPI info [00000022:00000022:(0016:01e9:01ff):019a:(0062:0000:0000:0000)]
[2333099.610954] tg3 0000:03:04.1 eth1: Link is down
[2333102.731813] tg3 0000:03:04.1 eth1: Link is up at 1000 Mbps, full duplex
[2333102.731822] tg3 0000:03:04.1 eth1: Flow control is off for TX and off for RX

The Debian upgrade changes the kernel and the new kernel seems to be not as stable as the old one which ran for years without any problem. One of the differences I found in the drivers is the ethernet acceleration mode for tg3 cards.

Workaround: after disabling some ethernet acceleration features I had no link resets. The computer is running about 9 weeks now with these settings:

/sbin/ethtool -K eth1 tso off
/sbin/ethtool -K eth1 gso off
/sbin/ethtool -K eth1 gro off

These commands disable segment offloading on eth1.

Versions: Debian 8.0 (July 2016), Kernel 3.16.0-4-amd64, Broadcom Corporation NetXtreme BCM5715 Gigabit Ethernet (rev a3)

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

Compiling Sendmail on Debian7

Problem: after compiling sendmail on Debian7 with “./Build” sendmail does not recognize hash .db files. You see the following error message:

readcf: map access: class hash not available

Discussion: ./Build should detect the berkley DB automatically. When devtools/bin/configure.sh finds libdb.so it adds -DNEWDB as compile option. On Debian7 the libdb.so file moved to /usr/lib/x86_64-linux-gnu/ and configure.sh fails to detect libdb.

WorkaroundLink the libdb.so and libdb.a file to /usr/lib with these commands:

cd /usr/lib/
ln -s x86_64-linux-gnu/libdb-5.1.a libdb.a
ln -s x86_64-linux-gnu/libdb-5.1.so libdb.so

Version: Debian 7, Sendmail-8.15.2

 

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone

Google Maps Marker on Mobile

Problem: A responsive webapp shows a google map with markers that are clickable. On desktop everything works as expected, but on mobile the markers are not clickable.

Discussion: After debugging with chrome remote inspector, I found that a div->frame with opacity:0 was lying above (explicit z-index:2) the clickable markers.

I don’t know what this frame is for, but it covers the markers and its click events.

Workaround: The frame is only loaded when the user is logged into google. You can remove this frame by removing “signed_in” from the script tag.

Version: https://maps.googleapis.com/maps/api/js on 23.2.2016. Chrome 48 on Android 5.1.1,

Share on FacebookTweet about this on TwitterShare on Google+Email this to someone