Forum Discussion
Zuke_149069
Nimbostratus
Apr 28, 2014DNS resolves to real server
I'm trying to find the proper way to manage how DNS resolves server names. This is probably a stupid question, but I'm going to ask it anyway.
I have a static DNS entry connected to a virtual s...
nitass
Employee
Apr 28, 2014can you try something like this?
e.g.
config
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
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 7
}
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_RESPONSE {
if { [HTTP::status] == 302 } {
HTTP::header replace Location [string map {http://realserver01.company.com http://virtualserver.company.com http://realserver02.company.com http://virtualserver.company.com} [HTTP::header Location]]
}
}
}
trace
[root@ve11a:Active:In Sync] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.24.1(34226) <-> 172.28.24.10(80)
1398693997.3095 (0.0016) C>S
---------------------------------------------------------------
HEAD /something 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: virtualserver.company.com
---------------------------------------------------------------
New TCP connection 2: 200.200.200.14(34226) <-> 200.200.200.101(80)
1398693997.3400 (0.0304) C>S
---------------------------------------------------------------
HEAD /something 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: virtualserver.company.com
---------------------------------------------------------------
1398693997.3422 (0.0022) S>C
---------------------------------------------------------------
HTTP/1.1 302 Found
Date: Mon, 28 Apr 2014 13:56:47 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://realserver01.company.com/something
Content-Type: text/html; charset=iso-8859-1
---------------------------------------------------------------
1398693997.3423 (0.0328) S>C
---------------------------------------------------------------
HTTP/1.1 302 Found
Date: Mon, 28 Apr 2014 13:56:47 GMT
Server: Apache/2.2.3 (CentOS)
Location: http://virtualserver.company.com/something
Content-Type: text/html; charset=iso-8859-1
---------------------------------------------------------------
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