I can see what is happening now, ASM does not seem to be hitting the irule at all. I need to take off the security policy next and see weather that make a difference.
I removed the security policy and it made no difference, So I know it’s not the ASM part given me the problem. Looking at the irule I had in place at the start, this also did not work at closer inspection. So I’m back to needing an irule that can do both the redirects, I hope you can help Patrik or any one else out there.
Yeah, the initial hosts was a bit strange to begin with and we would have had to fix them with some string manipulations later on anyway in order for normal requests to pass as well.
Let’s start with reverting to my original suggestion:
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
log local0. $host
if { $host equals "test.geowessex.com" } {
log local0. "Redirected based on $host"
HTTP::redirect "https://test.geowessex.com/geoserver/"}
elseif { $host equals "test2.geowessex.com" } {
log local0. "Redirected based on $host"
HTTP::redirect "https://vmcrgifme1"
}
}
[root@asm1:Active:Standalone] config tcpdump -nni any host 195.49.180.253 and host 172.23.101.78 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on any, link-type EN10MB (Ethernet), capture size 96 bytes 08:24:45.077001 IP 195.49.180.253.43746 > 172.23.101.78.8080: S 3716338419:3716338419(0) win 14600 08:24:45.077996 IP 172.23.101.78.8080 > 195.49.180.253.43746: S 3980470878:3980470878(0) ack 3716338420 win 8192 08:24:45.078520 IP 195.49.180.253.43746 > 172.23.101.78.8080: . ack 1 win 115 08:24:45.078805 IP 195.49.180.253.43746 > 172.23.101.78.8080: P 1:134(133) ack 1 win 115 08:24:45.080169 IP 172.23.101.78.8080 > 195.49.180.253.43746: P 1:87(86) ack 134 win 514 08:24:45.080234 IP 172.23.101.78.8080 > 195.49.180.253.43746: P 87:93(6) ack 134 win 514 08:24:45.080236 IP 172.23.101.78.8080 > 195.49.180.253.43746: P 93:130(37) ack 134 win 514 08:24:45.080509 IP 195.49.180.253.43746 > 172.23.101.78.8080: . ack 87 win 115 08:24:45.080512 IP 195.49.180.253.43746 > 172.23.101.78.8080: . ack 93 win 115 08:24:45.080514 IP 195.49.180.253.43746 > 172.23.101.78.8080: . ack 130 win 115 08:24:45.080792 IP 195.49.180.253.43746 > 172.23.101.78.8080: P 134:177(43) ack 130 win 115 08:24:45.080917 IP 195.49.180.253.43746 > 172.23.101.78.8080: P 177:205(28) ack 130 win 115 08:24:45.081303 IP 172.23.101.78.8080 > 195.49.180.253.43746: . ack 205 win 514 08:24:45.082497 IP 172.23.101.78.8080 > 195.49.180.253.43746: P 130:348(218) ack 205 win 514 08:24:45.082503 IP 172.23.101.78.8080 > 195.49.180.253.43746: F 348:348(0) ack 205 win 514 08:24:45.083625 IP 195.49.180.253.43746 > 172.23.101.78.8080: P 205:228(23) ack 349 win 123 08:24:45.083693 IP 195.49.180.253.43746 > 172.23.101.78.8080: F 228:228(0) ack 349 win 123 08:24:45.084047 IP 172.23.101.78.8080 > 195.49.180.253.43746: R 349:349(0) ack 228 win 0 08:24:45.084182 IP 172.23.101.78.8080 > 195.49.180.253.43746: R 3980471227:3980471227(0) win 0 08:24:50.078828 IP 195.49.180.253.43764 > 172.23.101.78.8080: S 209766624:209766624(0) win 14600 08:24:50.081892 IP 172.23.101.78.8080 > 195.49.180.253.43764: S 3264714030:3264714030(0) ack 209766625 win 8192
The problem is that there is traffic all the time (health monitor), please correct me if i’m wrong but you wont see any think from the VS (VIP address) as it will be making a new connection (reverse proxy) from the ASM IP address ? (VS is 195.49.180.208 and the ASM address is 195.49.180.253) is this not how it works ?