hostname
7 TopicsHandling www with host name redirects in iRule
I'm trying to figure out how I can handle the following situation. The section of the iRule below is for redirecting to a different URL based on a hostname. Our organization has purchased multiple domain names that are more or less used as shortcuts to a specific URL. For example: companydepartment.com -> http://www.company.com/department/index.html I'm using data groups to facilitate this with a name -> value in a string data group. In trying to optimize the code for this, I've ran into a snag when they want to use www.companydepartment.com. I have to create a duplicate entry for www.companydepartment.com -> http://www.company.com/department/index.html How can I handle this traffic so that both hostname with and without www. will be matched, and also with the understanding that there may be a subdomain to a different URL in some cases www.training.companydepartment.com -> http://www.company.com/department/training.html if {[class match [HTTP::host] eq group_80_host_redirect]} { HTTP::redirect [class match -value [HTTP::host] eq group_80_host_redirect] } Data group example ltm data-group internal group_80_host_redirect { records { company.com { data http://www.company.com } companydepartment.com { data http://www.company.com/department/index.html } training.companydepartment.com { data http://www.company.com/department/training.html } } type string }638Views0likes2CommentsIrule to block request from amazonaws.com
Hello, I have an irule to block request from amazonaws.com bad crawlers (millions of requests a day) but my irule doesn't work. Total executions is 0.. Here is the code : when HTTP_REQUEST { if { [matchclass [string tolower [HTTP::header Host]] contains blacklist_host] } { reject } } In my datagroup blacklist_host, I have amazonaws.com entry. If someone has a solution. Thank you782Views0likes4CommentsF5 LTM - iRule that will replace the host, remove the path and send traffic to the specific pool
Hi, I have a standard VIP on port 443 with SSL client and servers side profile and some pool on port 443 as well. What I need to implement on that VIP is: when the path begins with /VPC ( for example https://example.com/VPC) the host name (example.com) needs to be replaced by (example2.net) and path /VPC needs to be removed. After that this traffic (https://example2.net/) needs to be send to the specific pool (different than default but also on port 443). I suppose the iRule is the best option here. Unfortunately I cannot make simple 302 redirect... Of course if the URI does not begin with /VPC the traffic needs to go to the default pool. I found some similar cases on devcentral however neither of them match all the requirements.707Views0likes4CommentsNaming servers using AS3 Declaration
How do you name servers in an AS3 declaration? The following declaration names the server the IP address in the F5. { "class":"AS3", "action":"deploy", "declaration":{ "class":"ADC", "schemaVersion":"3.12.0", "id":"0", "shortlived":{ "class":"Tenant", "myhui1085_dev":{ "class":"Application", "template":"default", "myhui1085_dev":{ "class":"Service_HTTPS", "snat":"self", "serverTLS":{ "bigip":"/Common/digistar.spectrum-health.org" }, "virtualAddresses":[ "2.2.2.20" ], "pool":"myhui1085_dev_pool" }, "myhui1085_dev_pool":{ "class":"Pool", "monitors":[{ "bigip":"/Common/http_monitor" }], "loadBalancingMode":"least-connections-member", "members":[ { "adminState":"enable", "servicePort":80, "serverAddresses":[ "2.2.2.2" ], "hostname":"test_server2" } ] } } } } }382Views0likes1CommentModifying LTM hostname
Will changing my device hostname with command: "tmsh modify /sys global-settings hostname [hostname]" ..affect anything on my box such as device certificates or HA connection? Can I freely change my hostname without any consequence? The device name that is being used for HA is already the desired hostname so that does not need changed. I'm only referring to my hostname if this makes sense.813Views0likes4CommentsWhat is the hostname used for?
Hello, Doing a setup of new bigips and I need to add a hostname. What is the hostname/host ip used for? I picked 'use management port IP' for Host address. We would like heartbeat and clustering/peering to go over a specific VLAN/interface. Thank you.313Views0likes2CommentsCHANGE THE HOST NAME IF THE CONNECT IS A POOL MEMBER
Hi I need to change the hostname for "server1" if the connect is a pool member X and "server2" if the pool member is Y. In this case the client set the URL http://caso.com/ejemplo and the session is start with server 1 of URL change for http://server1:14002/another/place/case and the session is star with server 2 of URL change for http://server2:14002/another/place/case442Views0likes8Comments