[stunnel-users] Access an arbitrary https website on http://localhost:3000 via stunnel.

Ludolf Holzheid lholzheid at bihl-wiedemann.de
Thu Jan 14 17:45:05 CET 2016


On Thu, 2016-01-14 22:41:41 +0800, Hongyi Zhao wrote:
> [..]
> 
> I've tried add the following two lines into the /etc/hosts file:
> 
> 67.166.110.237 www.coolaj86.com
> 67.166.110.237 coolaj86.com
> 
> But still the issue exists when I use firefox to open http://localhost:3000/.

Hongyi,

you have to convince firefox use 127.0.0.1 as IP address and
coolaj86.com as host for the HTTP requests.

127.0.0.1 is the IP address your stunnel daemon listens on, and
coolaj86.com is needed by the remote server to select the right
virtual host.

Try to change your /etc/hosts to read
|
| 127.0.0.1 coolaj86.com
|
and stunnel-tlsvpn.conf to read
|
| connect = 67.166.110.237:443
|

Then, use http://coolaj86.com:3000 in firefox.

HTH,

Ludolf

P.S.: As your signature is English, I suppose it is for European/
      American/Oceanian eyes and your name is given in the European
      order (family name last).  Hongyi is your given name then.
      My apologies if this is wrong.

-- 

Ludolf Holzheid
 
Bihl+Wiedemann GmbH
Floßwörthstraße 41
68199 Mannheim, Germany
 
Tel: +49 621 33996-0
Fax: +49 621 3392239
 
mailto:lholzheid at bihl-wiedemann.de
http://www.bihl-wiedemann.de
 
Sitz der Gesellschaft: Mannheim
Geschäftsführer: Jochen Bihl, Bernhard Wiedemann
Amtsgericht Mannheim, HRB 5796


More information about the stunnel-users mailing list