Forum Discussion
MGrift_57913
Nimbostratus
Oct 30, 2012Return 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.
T...
nitass
Employee
Oct 30, 2012i 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
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