cancel
Showing results for 
Search instead for 
Did you mean: 

Creating iRule to mask/hide URL

j_carl_39543
Nimbostratus
Nimbostratus

Hi All,

 

 

I am new in using F5 Big-IP, I have a current task to either mask the website or totally hide the URL. If I decided to mask the URL, I need to create substitute link. Whenever the users click the URL link www.test.com, a different URL link will be displayed. Example www.test123.com but the original site www.test.com will be loaded. If I choose to hide the URL, the URL will be plain blank.

 

 

Please help which one is easier to implement and tips on how to implement it. Thanks in advance.

 

13 REPLIES 13

nitass
F5 Employee
F5 Employee
Whenever the users click the URL link www.test.com, a different URL link will be displayed. Example www.test123.com but the original site www.test.com will be loaded.www.test123.com will be resolved to the same (virtual server) ip of www.test.com, won't it?

j_carl_39543
Nimbostratus
Nimbostratus
Hi Nitass,

 

 

My only purpose here is to show different URL to the original URL, so that if they forward the URL or copied it they can not access the original URL.

What_Lies_Bene1
Cirrostratus
Cirrostratus
j_carl, understood, but unless the IP address used to resolve the real and fake domain names is the same this won't work, hence Nitass's question. Please confirm.

nitass
F5 Employee
F5 Employee
this is information from the past discussion.

 

 

manipulate url displayed in browser

 

https://devcentral.f5.com/community/group/aft/22378/asg/50

 

 

hope this helps.

j_carl_39543
Nimbostratus
Nimbostratus
This site is really helpful. It will have different IP address, I will try first what nitass attached discussion.

j_carl_39543
Nimbostratus
Nimbostratus
Hi All,

 

 

My boss now wants me to totally hide the whole URL whenever the users select the URL link. Can you help me with sample scripts. Thanks in advance.

hoolio
Cirrostratus
Cirrostratus
Hi Carl,

 

 

This isn't possible. See the post that Nitass linked to above for details:

 

https://devcentral.f5.com/community/group/aft/22378/asg/50

 

 

Aaron

Mohamed_Lrhazi
Altocumulus
Altocumulus
One could inject javascript to make all links ajaxified (even turn links into clickable spans if needed) and make the system behave as one wants it... but that would be web dev.

 

 

Thanks,

 

Mohamed.

hoolio
Cirrostratus
Cirrostratus
The client would still be able to see the URIs that the browser is requesting though. Short of encrypting all of the URIs I don't see a way to truly hide the URIs from a client. And it's not currently practical to encrypt all of the URIs for a web application with an iRule. I tried it once and it worked but it was a very brittle solution.

 

 

Aaron

j_carl_39543
Nimbostratus
Nimbostratus
Hi Aaron,

 

 

The client will just use this for company promotions so I think it will be use for just a short amount of time. Can you share sample scripting on how can I do this? I am really new with this appliance and was just asked to see if I can come up with the easiest procedure. Thanks!

hoolio
Cirrostratus
Cirrostratus
Hi Carl,

 

 

The iRule was tailored very specifically for a customer's application. It was ~1200 lines of code. It's not feasible for you to adapt that iRule to a new application.

 

 

Aaron

j_carl_39543
Nimbostratus
Nimbostratus
when HTTP_RESPONSE {

 

set server_location [string tolower [HTTP::header Location]]

 

if {$server_location starts_with "172.10.10.10:8050/cgi-bin/"} {

 

 

HTTP::header replace Location [string map -nocase {172.10.10.10:8050/cgi-bin/lansweb 172.10.10.10:8050/} [HTTP::header value Location]]

 

}

 

 

}

 

 

I have created an iRule to limit the uri displayed on the URL but it seems that it was not functioning as what it is created for. Can you guys help me if I missed something or need additional configurations.

What_Lies_Bene1
Cirrostratus
Cirrostratus
The location header is mainly only used in redirections, it's not going to help you change the URL displayed in the browser when a normal 200 response is sent.