Forum Discussion
Bryce_Halkerst1
Jul 11, 2013Nimbostratus
All,
Not having any issues with the irule outputting the last 2 digits of the server tcp ports. Client changed the ports on the server end, so I need the first 2 digits. See below.
Thanks,
Bryce
Last Digits work great
rule myrule {
when HTTP_RESPONSE {
scan [IP::remote_addr] {%*d.%*d.%d.%d} c d
HTTP::header insert "X-Who-A" "AN-$c.$d-[TCP::remote_port]"
}
}
Tried this logic for the first 2 digits in the header insert. No dice!
rule myrule {
when HTTP_RESPONSE {
scan [IP::remote_addr] {%*d.%*d.%d.%d} a b
HTTP::header insert "X-Who-A" "AN-$a.$b-[TCP::remote_port]"
}
}