Forum Discussion

Pandikumar_Muru's avatar
Pandikumar_Muru
Icon for Nimbostratus rankNimbostratus
Jun 30, 2015

Need to collect source IP which is connecting in LB in particular VIP or pools

Hi,

 

i want to know the source IP which is connecting to particular VIP. Because we are getting hits from Loadbalancer SelfIP of both active and standby every 5 sec to proxy servers. we need to troupleshoot this issue. so we need to find source ip to where its getting request.

 

5 Replies

  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    In real time you can use tcpdump if you have access to the cli, something like 'tcpdump -ni 0.0 host vip'

     

  • this irule will do it, I hope you don't have a lot of traffic on the VIP! are you sure the every 5 second hit on the proxies isn't the F5 health checks from the primary and standby?

     

    Log-all tcp traffic to a vip,

     

    when CLIENT_ACCEPTED {

     

    set vip [IP::local_addr]:[TCP::local_port] }

     

    when SERVER_CONNECTED {

     

    set client "[IP::client_addr]:[TCP::client_port]" set node "[IP::server_addr]:[TCP::server_port]" }

     

    when CLIENT_CLOSED {

     

    log connection info log local0.err "Client $client -> VIP: $vip -> Node: $node"

     

    }

     

    • Pandikumar_Muru's avatar
      Pandikumar_Muru
      Icon for Nimbostratus rankNimbostratus
      I am not aware of Helth check, I have reviewed the config its enabled TCP monitor, 5 sec. May Helath check will give a hits, How ever if we enable log we will get some Idea, Am i right ?
  • the irule will only catch traffic hitting the vip. the health checks will not hit the vip so they would not be logged, Use TCP dump and you will get your answer.