Forum Discussion
nitass
Oct 19, 2012Employee
thanks Steve.
i checked rfc again and i think ip is valid cookie value.
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
foreach acookie [HTTP::header values "Set-Cookie"] {
if { [scan $acookie {SNAT-IP-ADDRESS=%d.%d.%d.%d} a b c d] == 4 } {
snat ${a}.${b}.${c}.${d}
break
}
}
}
}
on client
curl -I http://8.8.8.8 -H "Set-Cookie: test=1234" -H "Set-Cookie: SNAT-IP-ADDRESS=10.10.10.10; path=/" -H "Set-Cookie: foo=abcd"
on bigip
[root@ve10:Active] config tcpdump -nni 0.0 port 80
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on 0.0, link-type EN10MB (Ethernet), capture size 108 bytes
19:59:09.615782 IP 200.200.200.101.49858 > 8.8.8.8.80: S 3734643271:3734643271(0) win 5840
19:59:09.615832 IP 8.8.8.8.80 > 200.200.200.101.49858: S 702811879:702811879(0) ack 3734643272 win 4380
19:59:09.616803 IP 200.200.200.101.49858 > 8.8.8.8.80: . ack 1 win 46
19:59:09.616826 IP 200.200.200.101.49858 > 8.8.8.8.80: P 1:245(244) ack 1 win 46
19:59:09.616992 IP 10.10.10.10.49858 > 8.8.8.8.80: S 16523661:16523661(0) win 4380