Tuesday, March 7, 2017

Using jump cloud RADIUS for fortimail external authentication

Here's a blog started which will be a series of jumpcloud configurations  for the FTNT fortimail appliance. This 1st up is a HOWTO with RADIIUS

You can  authentication remote fortimail clients using  the Jumpcloud  Radius-as-a-Service cloud  hosted.

The   JumpCloud radius servers are located at the following ipv4 address.The are hosted in a google cloud instance



1st, you need to ensure the fortimail has a clear path for communication on udp/1812 for the 2 radius servers.

2nd, you will configure the jump cloud  for your radius-client ( the actual fortimail device )



3rd, we will  define  radius  end-users  using the "+" for adding new users. The interface is simple but very effective and you should have no problem defining the user details.











Next, we will set the fortimail  appliance for radius by defining a radius-profile and users  with authentication type set for radius vrs local.



you can have a mix of external authentication and local for various users and mail-domains




Here's the profile that we will use;




And the user-name with authentication options;








And then back in  jump cloud we will define the radius_client  cfg by defining the ipv4 address , and secret for each fortimail device.






And that's all you need for the authentication  of the  fortinet fortimail to a RADIUSaaS


The mail-client upon activation ,  will  get a email-notice and link for reset the password.






You might NOT be able to apply  dual RADIUS SERVER in you profile,  so if you set a internal LB-VIP , & stick both jumpcloud  nodes in a pool behind that vip you can have redundant  RADIUS servers for authenications



e.g ( inside VIP  with the jumpcloud nodes as pool members )














































( FGT_OS  SLB CFG  or any SLB )


config firewall vip
    edit "jumpcloud"
        set uuid 41bbc114-0053-51e7-f7a3-46fbfce6ac39
        set type server-load-balance
        set extip 1.1.1.1
        set extintf "lan"

        set extport 1812
        set server-type udp
            config realservers
                edit 1
                    set ip 104.154.91.253
                    set port 1812
                next
                edit 2
                    set ip 104.196.54.120
                    set port 1812
                next
            end
    next
end





Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o 

        /  \

Monday, March 6, 2017

basic privoxy configuration

Privoxy is a simple  proxy that can be used in explicit-proxy setups. It's great for  organizations that needs or want a control web proxy that's quick to setup.

http://www.privoxy.org/faq/general.html#WHO-USES

It has one advantage of a webconfiguration page.


Here's a basic configuration















And sample of a log file. You can adjust the level of logging via  the debug commands.



 
Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o 

        /  \

Saturday, March 4, 2017

GEOLOOKUP ipv4/v6 F5-ltm

The F5 LTM products keep a simple GEOIP DB. It consist of rpm files that holds the geoip-database. These files are easy  to update and should be updated as new updates arises.

If  ever you do any geoip function like in amp policy, gtm , ltm-policy, or ltm-rule, than you should try to maintain  correct database info


1: to use the geoip lookup, it's simple to do





2: you can query ipv6 address also;





3: The  switches "i" and "o" gives you ISP or Org related information.
( see the differences )





Most geoip information breaks down to ISO 2 letter country and continent  code letters.

http://www.countrycallingcodes.com/iso-country-codes/africa-codes.php




 

Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o 
        /  \




Friday, March 3, 2017

F5 BigIP LTM-VE 11.6.1 HF2 to 12.0.0 ( issues RPM transaction failure )

Attempting to  upgrade from  11.6.1  to 12.0 and my  issues & findings. The upgrade was straight forward , but with the  RPM transaction Failures when trying to install any hot fixes was a show stopped.

*doing a forced mcpd  reload or manual installing the hotfix from the tmsh did not work

* deletion of the volume and resize the  2nd disk did not help either


So using the show system software

---------------------------------------------------
Sys::Software Status
Volume  Product  Version    Build  Active    Status
---------------------------------------------------
HD1.1    BIG-IP   12.0.0  0.0.606     yes  complete
HD1.2      none     none     none      no  complete


You can delete the  target volume  HD1.2

 delete  sys software  volume  HD1.2

And confirm it's deleted;

---------------------------------------------------
Sys::Software Status
Volume  Product  Version    Build  Active    Status
---------------------------------------------------
HD1.1    BIG-IP   12.0.0  0.0.606     yes  complete


Now find the  HotFix-image  and try again;



list sys software  hotfix images and find  the one to install


sys software hotfix Hotfix-BIGIP-12.0.0.1.0.628-HF1.iso {
    build 1.0.628
    checksum 1aa326fd7d5f5bea6502f74f29bc816a
    id HF1
    product BIG-IP
    title "Hotfix Version 1.0.628"
    verified yes
    version 12.0.0
}
sys software hotfix Hotfix-BIGIP-12.0.0.4.0.674-HF4.iso {
    build 4.0.674
    checksum cea9cbe68654b97e4b77b1a21e06a58b
    id HF4
    product BIG-IP
    title "Hotfix Version 4.0.674"
    verified yes
    version 12.0.0
}



Now do a manual install specify the create-volume and volume name


install  sys software  hotfix  Hotfix-BIGIP-12.0.0.1.0.628-HF1.iso create-volume  volume  HD1.2

Monitor the installation;

{ notice how HD1.2 is being installed with 12.0.0 base before the  HF#1 is applied }


(tmos)# show sys software status

----------------------------------------------------------------
Sys::Software Status
Volume  Product  Version    Build  Active                 Status
----------------------------------------------------------------
HD1.1    BIG-IP   12.0.0  0.0.606     yes               complete
HD1.2    BIG-IP   12.0.0  0.0.606      no  installing 10.000 pct


Now it will start the  HF install


(tmos)# show sys software status

----------------------------------------------------------------
Sys::Software Status
Volume  Product  Version    Build  Active                 Status
----------------------------------------------------------------
HD1.1    BIG-IP   12.0.0  0.0.606     yes               complete
HD1.2    BIG-IP   12.0.0  1.0.628      no  installing 79.000 pct



We gave up on this upgrade path and the LTM-VE and upgraded to  12.1.0 HF#2 with no issues. Never found a reason for the RPM instance failure.

In 12.1.0 you will find a few  items upon login




Jumping  forward the 1st thing notice when you log into the F5 LTM is the fact it's managed by BIGIQ. This status is great if you have device that are or are not managed by the BIGIQ appliance.







Be aware that   auto-updates was enabled, so this was disable on this test LTM




You can also  generate  quickviews from the support tab no need to have tmsh/bash console access.



The  12.1.0 default certificate has no-proper state definitions for the 2letter abbr.






Stay tune for more.



 
Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o 
        /  \


Wednesday, February 22, 2017

Understanding HTTP redirect traces analysis

When dealing with http servers and SLB, it's common to have redirects, but you need to understand the differences.

Typically 301 and 302 are the most used redirect methods. 307 is another   redirection but not seems that often. These are also called "Server Side redirect" since they typically in the past where used on web-server daemons but in  reality they could be  servers, WAF or reverse-proxies.


Let's look at some redirects examples , but before we do that, " what are redirects"? These are   populate Location: headers that re-points the  web client to the  web content that he/she is looking for. The simple definition

A  location is passed to the User-Agent in the shape and fashion of

Location: http://kenfelix.com/blogger/

Or

Location: https://kenfelix.com/

This new Location header is just that, a header  that points you to the new location.

301 == permanent
302 == Found-A-new-Location
307 == temporary

NOTE: 302 are mistakenly called temporary  redirects , but per the http.definitions, they are not.


reference https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Here's my bank IBC, this is a very bad redirect flow. It just cause more additional work on the browser , and  additional delay for the 1st byte served or the content requested





Up next here's another example of a redirect flow. I highlighted cookies in this one . Two window servers where involved plus a load-balance

note: notice how Set-Cookies are not encrypted, this  leaks internal host information





One of the best unix tools available for following redirects is the  unix curl with the -L option.

L == Locations


Here's mail.google.com, notice the URL protocol changes  if you initially hit the 1st link via HTTP.





Each redirect  creates a new HTTP.request and adds to the dependency  and  delay factor.


Typical a domain redirect  are very popular;

e.g



And for SSL enabled  site a  http-2-https are commonly used




Jigsaw has a simple and effective  307 redirect and proper use ( notice temporary in the http.response code ?}

https://jigsaw.w3.org/HTTP/300/Overview.html



HTTP/1.1 307 Temporary Redirect  <-----

vrs

HTTP/1.1 302 Moved Temporarily    <-----




Here's how paypal redirects   302 then 301 (a big no no  imho )







reference  http://www.redirect-checker.org/index.php


Good practices are ;

1: keep the redirects as small as possible
2: use  307 redirects when possible & if the  target is Temporary and not Temporarily
3: avoid a redirect loop 
4: if you redirect from HTTP  2 HTTPS on a server, try to use HTTPS on that server
5: check redirects consistency and  remove any stale redirects on a regular basis
6: for web-developers, harvest your site URLs and run them thru a spider or URL optimizer that  minimizes duplications a short HTTP hops between redirects on a local website
7: remember   redirect types 301 are more favorable for SEO



These tips would help you in  creating a good HTTP experience for  the end-user


NOTE: PayPal is really cool if they see your a web-analyzer guy that uses curl , they give you  a X custom header for jobs recruiting in the  response






Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o 

        /  \

Tuesday, February 21, 2017

finding the max TPS for CLIENTSIDE SSL F5

Here's a sure way on a F5 LTM-VE image for finding the max  Ssl client_side connections that's allowed

1st monitor the  F5 performance stats

(tmos)# show sys performance  | grep SSL
SSL Transactions               Current  Average  Max(since 02/21/17 12:45:27)

SSL TPS                             25       35                            44


2nd  gather the license details


show sys licens


3rd now grep for TPS and TMM counts 

(tmos)# show sys license detail | grep -i perf_SSL_total
perf_SSL_total_TPS [500]


(tmos)# show sys tmm-info global | grep   TMM
Sys::TMM           
  TMM Count               2


The  total would be your  TPS count  X  TMM-qty



 
Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o 

        /  \

Sunday, February 19, 2017

In a pinch how to find your FGT serial_number

If you have a  Fortigate and in a ACT-PAS cluster and you can't login, the  factory    installed certificate will have  the serial number in the CN



examples






1>

CN=FG3K2C3Z23803457




2>




This is also useful when your confused on what  FGT unit is the active from a management purpose.






 
Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com
     ^      ^
=(  @  @ )=
         o 
        /  \