For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Sylvain_85827's avatar
Feb 09, 2016

tmsh gui banner with multiline

Hi,

I know how to do it from GUI but I'd like find how to configure a multiline security banner directly from tmsh command line. For example let's say below banner:

Warning line1 and now line 2 and now line 3 and final line

I try this (using ' " " ' ) :

[root@vm-bigip-ltm-asm-01:Active:Standalone] config  tmsh
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos) modify sys global-settings { gui-security-banner enabled gui-security-banner-text '"Warning line1
Syntax Error: single quotes are not balanced
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos) and now line 2
Syntax Error: unexpected argument "and"
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos) and now line 3
Syntax Error: unexpected argument "and"
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos) and final line"' }
Syntax Error: unexpected argument "and"
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos)

But nope 😕

Any idea please?

Regards.

4 Replies

  • Sorry I reply to my self...

    tmsh modify sys global-settings { gui-security-banner enabled gui-security-banner-text '"Warning line1
    and now line 2
    and now line 3
    and final line"' }
    

    Works just fine 😄

    • jsprattler's avatar
      jsprattler
      Icon for Nimbostratus rankNimbostratus

      Hi Sylvain, Thank you for providing this. I'm able to enter my multi-line security banner however it doesn't seem to save to the GUI when I break out of the command. How were you able to get this saved? I must be missing something simple here. Thanks in advance!

      For example:

      config  tmsh modify sys global-settings { gui-security-banner enabled gui-security-banner-text '"Warning line1
      and now line 2
      and now line 3
      and final line"' } [ENTER]
      > [CTRL+c]
      config 
      
    • Only1masterbla1's avatar
      Only1masterbla1
      Icon for Cirrus rankCirrus

      Copy entire block like this:

       

      tmsh modify sys global-settings { gui-security-banner enabled gui-security-banner-text 'Warning line1 and now line 2 and now line 3 and final line' }

       

      which appears in CLI like this:

       

      tmsh modify sys global-settings { gui-security-banner enabled gui-security-banner-text 'Warning line1

       

      and now line 2 and now line 3 and final line' }

       

      and GUI has this display:

       

      Warning line1 and now line 2 and now line 3 and final line

       

  • hi, for those who wants a dynamic banner, you can run regularly something like this :

     

    tmsh modify sys global-settings gui-security-banner enabled gui-security-banner-text "`cat /etc/motd&&tmsh show cm failover-status | grep "Status "&&echo -e "\nUNAUTHORIZED ACCESS IS PROHIBITED\n\nPartition list :\n"&&tmsh list auth partition one-line | grep -vi common | sed -e "s/auth partition //" -e "s/ {.*//"`"