Forum Discussion
Wasim_Hassan_13
Nimbostratus
Jul 03, 2014Hostname Modification in F5
Hi,
I have below mention requirement
users will have the link
http://testmail.abc.com
and it will redirect to
http://uatebsapp1.abc.com:8060
but i want to hide the ac...
nitass_89166
Noctilucent
Jul 06, 2014or you may rewrite location header (e.g. from uatebsapp1.abc.com:8060 to server1.abc.com:8060) in response from pool member.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:8060
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 49
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST_SEND {
clientside {
HTTP::header replace Host "uatebsapp1.abc.com:8060"
}
}
when HTTP_RESPONSE {
if { [HTTP::status] == 302 } {
HTTP::header replace Location [string map {uatebsapp1.abc.com:8060 server1.abc.com:8060} [HTTP::header Location]]
}
}
}
client
[root@centos1 ~] curl -i http://172.28.24.10:8060/OA_HTML/AppsLogin -H "host: ebsdmz.abc.com:8060"
HTTP/1.1 302 Found
Date: Sun, 06 Jul 2014 11:21:34 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://server1.abc.com:8060/
Content-Length: 300
Content-Type: text/html; charset=iso-8859-1
trace
[root@ve11a:Active:In Sync] config ssldump -Aed -nni 0.0 port 8060 or port 80
New TCP connection 1: 172.28.24.1(51851) <-> 172.28.24.10(8060)
1404646386.7267 (0.0021) C>S
---------------------------------------------------------------
GET /OA_HTML/AppsLogin HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Accept: */*
host: ebsdmz.abc.com:8060
---------------------------------------------------------------
New TCP connection 2: 200.200.200.14(51851) <-> 200.200.200.101(80)
1404646386.7288 (0.0019) C>S
---------------------------------------------------------------
GET /OA_HTML/AppsLogin HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Accept: */*
host: uatebsapp1.abc.com:8060
---------------------------------------------------------------
1404646386.7648 (0.0360) S>C
---------------------------------------------------------------
HTTP/1.1 302 Found
Date: Sun, 06 Jul 2014 11:21:34 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://uatebsapp1.abc.com:8060/
Content-Length: 300
Content-Type: text/html; charset=iso-8859-1
...snipped...
---------------------------------------------------------------
1404646386.7649 (0.0382) S>C
---------------------------------------------------------------
HTTP/1.1 302 Found
Date: Sun, 06 Jul 2014 11:21:34 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://server1.abc.com:8060/
Content-Length: 300
Content-Type: text/html; charset=iso-8859-1
...snipped...
---------------------------------------------------------------
Wasim_Hassan_13
Nimbostratus
Jul 08, 2014Hi,
I am trying the below config but no luck
user is trying
http://192.168.206.24:8080
ltm virtual VS_TEST {
destination 192.168.206.24:webcache
ip-protocol tcp
mask 255.255.255.255
partition PRPRDWEBDMZ
persist {
ENOC_PRDWEB_STICKY {
default yes
}
}
pool TEST_POOL
profiles {
/Common/tcp { }
PRE-PROD-WEB-DMZ-Profile { }
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 140
}
ltm pool TEST_POOL {
members {
PRE-PRD-WebServer1:http {
address 192.168.206.21
session monitor-enabled
state up
}
PRE-PRD-WebServer2:http {
address 192.168.206.22
session monitor-enabled
state up
}
}
monitor EBS_UAT
partition PRPRDWEBDMZ
ltm rule UAT_TEST {
partition PRPRDWEBDMZ
when HTTP_REQUEST {
if { [HTTP::host] eq "uatebsapp1.abc.com:8080" } {
HTTP::redirect "http://server1.abc.com:8080[HTTP::uri]"
}
}
when HTTP_REQUEST_SEND {
clientside {
HTTP::header replace Host "uatebsapp1.abc.com:8080"
}
}
}
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