Application Delivery (ADX)

Reply
Contributor
Posts: 49
Registered: ‎04-24-2009

How to insert a new header containing client ip address

We want to insert a new header in the request containing client ip address ? what rule is needed

Occasional Contributor
Posts: 17
Registered: ‎08-19-2008

Re: How to insert a new header containing client ip address

The client-ip can be applied on any forward rule, or default rule.

In this example, we will forward all request ending in "html" to server rs10, and the rest to server rs20. In both cases, we will insert client-ip in the request.

Configuration

!
server source-nat-ip 10.45.4.254 255.255.255.0 0.0.0.0 port-range 2
!
csw-rule "r1" url suffix html
!
csw-policy "p1"
match r1 forward 1
match r1 rewrite request-insert client-ip
default forward 2
default rewrite request-insert client-ip
!
server real rs10 10.45.4.10
source-nat
port http
port http url "HEAD /"
port http group-id 1 1
!
server real rs20 10.45.4.20
source-nat
port http
port http url "HEAD /"
port http group-id 2 2
!
server virtual vip1 10.45.4.245
port http
port http csw-policy "p1"
port http csw
port http keep-alive
bind http rs10 http rs20 http
!

The HTTP requests will look like this:

Original Request

        GET / HTTP/1.1\r\n
        Host: 10.45.4.245\r\n
        User-Agent: ELinks/0.9.2 (textmode; Linux; 90x30)\r\n
        Accept: */*\r\n
        Accept-Encoding: bzip2, gzip\r\n
        Accept-Language: en\r\n
        Connection: Keep-Alive\r\n
        \r\n

Modified Request (Notice the new header, Client-IP)

        GET / HTTP/1.1\r\n
        Client-IP: 10.45.4.19 \r\n
        Host: 10.45.4.245\r\n
        User-Agent: ELinks/0.9.2 (textmode; Linux; 90x30)\r\n
        Accept: */*\r\n
        Accept-Encoding: bzip2, gzip\r\n
        Accept-Language: en\r\n
        Connection: Keep-Alive\r\n
        \r\n

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.

vADC is now Pulse Secure
Download FREE NVMe eBook