Forum Discussion
Return a text string
We are looking to re-direct Microsoft Network Connect Service queries (http://www.msftncsi.com/ncsi.txt) to a virtual server, and serve up the string ourselves via an F5 iRule or other method.
The text file contains the following line:
Microsoft NCSI
Is this possible? We are exceeding our Websense License count by this simple connect script, as computers which are not used to connect to the internet still run up our license count by connecting to this website.
Thanks,
Mark
- natheCirrocumulusMark
- natheCirrocumulusMark
- What_Lies_Bene1CirrostratusThis is definitely possible. I'll post an iRule shortly.
- What_Lies_Bene1Cirrostratus
Here you go;
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] ends_with "ncsi.txt" } { HTTP::respond 200 content "Microsoft NCSI" } }
--Corrected as directed below
- etem055Nimbostratus
where should be define this file?
ncsi.txt
- nitassEmployeei just corrected bracket and operator.
[root@ve10:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.79:80 ip protocol 6 rules myrule profiles { http {} tcp {} } } [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if { [string tolower [HTTP::path]] ends_with "ncsi.txt" } { HTTP::respond 200 content "Microsoft NCSI" noserver Content-Type "text/html" Connection "Close" } } } [root@ve10:Active] config curl -i http://172.28.19.79/ncsi.txt HTTP/1.0 200 OK Content-Type: text/html Connection: close Content-Length: 14 Microsoft NCSI
- Mohamed_LrhaziAltocumulusDoes not sound very kosher though. for example, why block that URI, if in fact you think they should not be allowed to use any Internet service at all?
- Mohamed_LrhaziAltocumulusPlease ignore my kosherness remark and accept my apologies. that was wrong and wrong.
- What_Lies_Bene1CirrostratusThanks as ever nitass. I've corrected my post too just in case someone doesn't scroll down!
- natheCirrocumulusMark, looks like I was too keen to get a new feature in (relatively new anyway) and over complicated matters.
- MGrift_57913NimbostratusThanks guys.
Recent Discussions
Related Content
* 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