3

I use firefox extensively to access and troubleshoot a myriad of webapps, many of them running on apache virtualhost'ed environments.

One problem I've been having is that on SSL-enabled servers I can't override the hostname to access the correct virtualhost.

With HTTP one could access an IP address with http://1.2.3.4/page.html and forge the host: header with different values to access different virtual hosts.

For instance, these are equivalent:

  • http://my.virtualhost.example.com
  • http://1.2.3.4 with header host: my.virtualhost.example.com.

With HTTPS this becomes impossible, since the hostname must be known prior to establishing the TLS connection, and thus there isn't a way for apache to know which SSL virtualhost to serve.

A workaround would be to override the Server Name Indication (SNI) field in the TLS ClientHello request.

Is there any way to override the SNI value with Firefox plugins or extensions?

I'm using Firefox 40 on Windows 7.

1
2

You can simply add the name/ip mapping you want to use to the hosts file and then access the site with the name you want. Unless you use a proxy it will use the hosts file to determine the IP address and will use the name you gave as SNI name and inside the Host header. For details on how to modify this file see http://www.rackspace.com/knowledge_center/article/how-do-i-modify-my-hosts-file

3
  • That is a solution I've used before, but unfortunately it becomes impossible if you don't have admin rights on your PC. – André Fernandes Aug 19 '15 at 10:38
  • 1
    @AndréFernandes: If you can install virtual machines you could install a VM with a proxy (like Ubuntu with squid) and do the DNS handling there. – Steffen Ullrich Aug 19 '15 at 11:54
  • Also did that, including setting up a proxy in the network that has special handling for the hostnames/IPs we are testing. Too cumbersome to set up and maintain. – André Fernandes Aug 19 '15 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.