Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Is it possible to log URL with SNAT in one log ?

Hello,

We want to write a Irule to log src_ip,dst_ip,nat_ip,url in one rule,but we found that can't work, because http_request can't see nat_ip,is it possible to log URL with SNAT in one log ?Does anyone have relevant experience?

Best wishes, Jim

0
Rate this Discussion
Comments on this Discussion
Comment made 25-Sep-2014 by jim 2
This is my Irule,but I can't see NAT IP,when i log on http_request. when SERVER_CONNECTED { set nat "[IP::local_addr]" table set -subtable NAT [IP::local_addr] $nat 1800 log local0.info "NAT_IP:[table lookup -subtable NAT [IP::local_addr]]" } when HTTP_REQUEST { set node "[IP::remote_addr]:[TCP::remote_port]" set url [HTTP::header Host][HTTP::uri] set dst [IP::local_addr]:[TCP::local_port] log local0.info "Source: $node ---> Connect to:$dst,NAT_IP:[table lookup -subtable NAT [IP::local_addr]],URL:$url" }
0

Replies to this Discussion

placeholder+image

I just happened to be looking at this the other day.

If you have 11.3.x or higher, you can use the request logging profile to log all this stuff. Take a look at BIG-IP External Monitoring Implementations

0
Comments on this Reply
Comment made 25-Sep-2014 by jim 2
Thanks you answer,that's useful! But,we can't do this in F5?I means use F5 GUI to display these log.
0
placeholder+image

I can't see where you are actually NATting in your iRule, or are you doing it outside of it?

0
Comments on this Reply
Comment made 25-Sep-2014 by jim 2
Actually,I want to see src_ip,dst_ip,nat_ip,url,in one log,automap is open on virtual server.
0
placeholder+image

Hi Jim,

Did you try to use your variables in SERVER_CONNECTED event?

It should work as variables are linked to the client session.

0