Forum Discussion

RiverFish's avatar
RiverFish
Icon for Altostratus rankAltostratus
Dec 09, 2019

Forward request to IP contained in request header.

Customer is trying to avoid opening a bunch of firewall requests. They want to add a header (ex. DEST: 10.x.x.x) in the request that contains the real destination IP. When the VIP receives the request an iRule will grab that IP and forward the request to that IP. Is this possible? Anyone want to take a crack at it?

1 Reply

  • We pieced this together. Hopefully it will work...

    when HTTP_REQUEST {
    if { [HTTP::header exists "DEST-IP"] } {
        set DEST-IP [HTTP::header "DEST-IP"]
        log local0. "HTTP request DEST-IP: $DEST-IP"
        node $DEST-IP 443
    } else {
        log local0. "No DEST-IP header found"
        drop
        return
    }