Forum Discussion
Ian_Rickerby_17
Nimbostratus
Nov 11, 2014destination ip redirection
need to redirect incoming connections to different ip addresses based on url info and data groups
nitass_89166
Noctilucent
Nov 23, 2014e.g.
configuration
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 2
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
set storeid [URI::path [HTTP::uri] 1 1]
if { [class match -- $storeid equals storeid_to_ip] } {
set ip [class match -value -- $storeid equals storeid_to_ip]
HTTP::header replace Host $ip
HTTP::uri [string map [list $storeid /] [HTTP::uri]]
node $ip
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm data-group internal storeid_to_ip
ltm data-group internal storeid_to_ip {
records {
/0001/ {
data 200.200.200.101
}
/0002/ {
data 200.200.200.111
}
}
type string
}
trace
[root@ve11a:Active:In Sync] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.24.1(36489) <-> 172.28.24.10(80)
1416743408.3850 (0.0015) C>S
---------------------------------------------------------------
GET /0001/rest/of/url HTTP/1.1
User-Agent: curl/7.29.0
Accept: */*
Host: f5-retail
---------------------------------------------------------------
New TCP connection 2: 200.200.200.11(36489) <-> 200.200.200.101(80)
1416743408.3868 (0.0004) C>S
---------------------------------------------------------------
GET /rest/of/url HTTP/1.1
User-Agent: curl/7.29.0
Accept: */*
Host: 200.200.200.101
---------------------------------------------------------------
nitass_89166
Noctilucent
Nov 23, 2014i used http because it is easier to trace.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
