Skip to main content

F5 Lab Guide Set Up

----------------------------------------------------------------------------------------------
F5 Lab Guide Set Up
----------------------------------------------------------------------------------------------



I have to learn and practice iRules. That's why I decided to set up my lab. Below you can find my notes. For some of you it may be easy but I wanted to be clear enough even for people with basic computer/network skills.
----------------------------------------------------------------------------------------------



Required components:

1)VMware Player

2)BIG-IP: BIGIP-11.3.0.39.0-scsi.ova

  https://f5.com/products/trials/product-trials

  You have to select 1 option, register and generate license which will be sent by email (you have to start downloading).

3)Application servers (min 2) - Centos 64-bit (minimal ISO):

  http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso

4) Client server

  http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Everything-1511.iso

----------------------------------------------------------------------------------------------

Install steps:

1) install VMware Player

   Once you install VMware check what subnet is allocated for your VM interfaces (may be different from what I have):


Ethernet adapter VMware Network Adapter VMnet1:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::fcb8:569:6ada:d9cc%50
   IPv4 Address. . . . . . . . . . . : 192.168.80.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::c884:6070:5f40:e90d%51
   IPv4 Address. . . . . . . . . . . : 192.168.174.1                  
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :



2) install BIG-IP package

 a) Home->Create a New Virtual Machine and click Import
 b) Accept license and wait couple of minutes
 c) Before you start VM change network settings:
    - select your new VM and click 'Edit virtual machine settings'
    - you should be in the 'Hardware' tab and find 'Network Adapter' (you should have 4)
    - select 1st one (management access) and set: Custom: VMnet8 (NAT)
    - select 2nd one (client interface) and set: Custom: VMnet1 (Host-only)
    - select 3rd one (server interface) and set: Custom: VMnet2
    - click OK

3) install (2x) Linux server (Centos)

 a) Home->Create a New Virtual Machine
 b) Select 2nd option: Installer disc image (iso) and select your image, then click Next
 c) Change default name to Server1/Server2 (just example), then click Next
 d) Akcept Disk settings and click Next
 e) Review settings and click Finish
 f) Select 1st option "Install CentOS 7"
 g) Select desired languge theme and click Continue
 h) Select Date&Time and select your timezone
 i) Select Installation Destination, review it and click 'Done' (top-left corner)
 j) You may change network settings (optional, we will change it during setup)
 k) Click Begin Installation
 l) Select and set a Root Password and click 'Done' (top-left corner)
 m) Wait couple of minutes - installation in progress...
 n) Click Reboot


----------------------------------------------------------------------------------------------

Set-up steps:


*****************************************************************
how to use vi editor:

- once you type: vi filename
- before you can edit you have to type ':i' to enter edit mode
- once you finish click 'Esc' and you will be back in read mode
- to save file: ':w'
- to exit file: ':q'
- to save and exit: ':wq'
*****************************************************************


1) Application server1

  a) set a static IP (you can also do it during installation): 


     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      please check what is your interface name by:
          ls /etc/sysconfig/network-scripts/
     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


     vi /etc/sysconfig/network-scripts/ifcfg-eno16777736

     You need to change following parameters here:

     -BOOTPROTO="static"
    
     and add 3 new:

     -IPADDR=192.168.175.133
     -NETMASK=255.255.255.0
     -GATEWAY=192.168.175.110

   b) add a default gateway

      vi /etc/sysconfig/network-scripts/route-eno16777736

      default 192.168.175.110 dev eno16777736

   c) Web Application  (answer always 'Y')

      - install following packages:

      yum groupinstall "Web Server"
      yum install httpd
      yum install php
      yum install php php-mysql

      - set up Apache:

      vi /etc/httpd/conf/httpd.conf

      Find: #ServerName www.example.com:80 and add below:

      ServerName localhost

      - restart httpd service:

      service httpd restart

      or you can also restart your machine:

      shutdown -r now

    d) add a test webpage (otherwise you will see only 'welcome' page from Apache')

      cd /var/www
      vi index.html

      and add "Server1 IP address 192.168.175.133"

      so once you hit this server you will know on which one you are.


2) Application server2

     Repeat the same steps and modify IP address to 192.168.175.134


3) BIG-IP

     Default passwords: GUI admin/admin
                        CLI root/default
   
     https://support.f5.com/kb/en-us/solutions/public/13000/100/sol13148.html


     a) set management IP:

       modify /sys global-settings mgmt-dhcp disabled
  
       create /sys management-ip 192.168.174.100/24

     b)  you can confirm you have correct IP:

        list /sys management-ip

     c) check what is your management route:

        list /sys management-route

     d) set correct default route for management interface:

        modify /sys management-route default gateway 192.168.174.1

     e) set admin password:

        modify auth user admin password XXXXXX

     f) save your settings:

        save /sys config partitions all
    
     g) open CLI (console or ssh)

        ssh 192.168.174.100

        and activate licenses:


       get_dossier -b XXXXX-XXXXX-XXXXX-XXXXX-XXXXXX

       copy that dossier and paste here:  https://secure.f5.com/Infopage/index.jsp

       once you generate license just download it and add to the file: /config/bigip.license

       vi /config/bigip.license

       and paste that license.Reload license:

       reloadlic

       Access WebGUI and finish activation process.


     h) add VLANs (from Web GUI)

        Menu: Network->VLANs: click Add with any name like Vlan1 and allocate physical interfaces 1.1 (untagged)
        Menu: Network->VLANs: click Add with any name like Vlan2 and allocate physical interfaces 1.2 (untagged)

     i) enable physical interfaces:

        Menu: Network->Interfaces, interfaces 1.1 and 1.2 should be enabled now

     j) add Self IPs:

        we should have one IP assigned for server's network and one for client's network:

        Menu:Network->Self IPs->Create:

        Name: serverNetwork
        IP: 192.168.175.110 (default gateway for my servers)
        Netmask: 255.255.255.0
        Vlan: vlan2
        
        Name: ClientNetwork
        IP: 192.168.80.110
        Netmask: 255.255.255.0
        Vlan: vlan1


     k) we are ready now to configure VIP

        - add a new Pool with 2 members: Menu: Local Traffic->Virtual Server->Pools select Add
        - add a new name PoolOfServers (example)
        - select http Healt Monitor
        - fill data of the 1st application server: node name: Server1, Address: 192.168.175.133, Port: 80        
        - click Add in the New Members section
        - repeat the same with 2nd server (192.168.175.134)
        - click Finished
        - add VIP: menu: Local Traffic->Virtual Servers->Virtual Server List and click Create
        - add: Name: VIP-test1, Address: 192.168.80.150, Service Port: 80, HTTP profile: http, default pool: PoolOfServers
        - click Finished
       
 
---------------------------------------------------------------------------------------------

Now you should be able to test the VIP (192.168.80.150) but your client should be in Vmnet1 in my case (192.168.80.0/24)

If you have any problems with understanding or something is unclear just let me know. I'll try to help you.

---------------------------------------------------------------------------------------------

Comments

Popular posts from this blog

What should you know about HA 'override enabled' setting on Fortigate?

High availability is mandatory in most of today's network designs. Only very small companies or branches can run their business without redundancy. When you have Fortigate firewall in your network you have many options to increase network availability. You can use Fortigate Clustering Protocol ( FGCP ) or Virtual Router Redundancy Protocol ( VRRP ). FGCP has two modes: 'override' disabled (default) and 'override' enabled . I'm not going to explain how to set up HA as you can find many resources on Fortinet websites: https://cookbook.fortinet.com/high-availability-two-fortigates-56/ https://cookbook.fortinet.com/high-availability-with-fgcp-56/ Let's recap what is the main difference between them. The default HA setting is 'override' disabled and this is an order of selection an active unit: 1) number of monitored interfaces - when both units have the same number of working (up) interfaces check next parameter 2) HA uptime - an ...

FortiGate and GRE tunnel

Recently I worked on one project where a client requested to re-route web traffic to the GRE tunnel to perform traffic inspection. I would like to share with you what is required if you configure it on FortiGate. We need a new GRE interface and policy base routing (PBR) to change the route for specific source IPs. Of course you need firewall policies to permit the traffic. Let's start with GRE interface. Unfortunately you can't configure it using the GUI, only CLI is the option: config system gre-tunnel edit "gre1" set interface "port1" set local-gw 55.55.55.55 set remote-gw 44.44.44.44 next end When the end peer is Cisco router, you need to set the IP for the GRE interface: config system interface edit gre1 set ip 192.168.10.10 255.255.255.255 set remote-ip192.168.10.20 end In next step we need to fix routing. We need the alternate path via GRE but to keep the route in the active routing table you need to set the same AD (adminis...

Inpection of asymmetric sessions on FortiGate

There is one feature available on FortiGate, and I think you should know it, as it modifies a bit what we know about stateful firewalls. In past every packet was treated individually and you had to create policies in both directions. With stateful firewalls we can track connections, and by checking couple of attributes, we can treat them as part of the same session. For example when you initiate connection from a host1 to host2, the returning connection from host2 to host1 will be treated as part of the same connection (session). They have to have the same source/destination and destination/source IPs, port numbers and interfaces.There is an exception from this rule and FortiGate in some specific cases can accept connections on port which was not used in the initial connection. Let me explain how it works on the below example:      The host1 has a default gateway on R1 (10.0.1.2), but you may notice that it is not the optimal path to host2 subnet. When we analyze ...