0

TL;DR: I have access to the localhost on my iPhone but can't reach local websites because I have no access to the host file.

Hi everyone,

I have a local website that uses a CMS setup on my laptop. The binding is specified correctly in IIS and reachable on my laptop. By getting the local address (192.168.xxx.xxx) and opening the appropriate ports, I am able to reach the localhost on my desktop computer and my iPhone. By adding the host name to the host file on my desktop, I am able to reach the website. So far so good!

However, I am not able to reach the site on my iPhone as I have no access to the hosts file. I tried setting up a binding that specifies the IP address and a set port (192.168.xxx.xxx:port) with limited success, the site was reachable but the CMS I am using on my site requires a hostname to function correctly. I want to be able to reach the site using an Android phone as well if possible, but again, I have no access to the host file.

I know its possible to fix this with DNS forwarding but I don't have access to the router over the network I am using.

Is it possible to specify the hostname in the url along with the IP address? Something like 192.168.xxx.xxx:hostname? If this is possible, I will be able to access the site on my iPhone and also on Android phones.

Any advice would be greatly appreciated, thank you!

Albraa
  • 337
  • 1
  • 4
  • 11
  • Just checking if you tried a WiFi proxy with a DNS spoofer on your desktop/laptop to intercept and rewrite the calls from your mobile device. – Morrison Chang Apr 12 '17 at 00:35
  • No I haven't. I am not sure how to go about doing that on my iPhone. Could you please elaborate? Thanks! – Albraa Apr 12 '17 at 01:09
  • As you mentioned IIS I haven't tried it on Windows but you could look at Charles Proxy: https://www.charlesproxy.com/documentation/tools/dns-spoofing/ Searching on 'WiFi Proxy' and 'DNS spoofer' should help in finding for info on the topics. Good luck. – Morrison Chang Apr 12 '17 at 03:48

1 Answers1

0

OK I found an alternative to all this by forcing my phone to use the host file on my laptop. I found the answer here: https://stackoverflow.com/a/6385967/2398998

Community
  • 1
  • 1
Albraa
  • 337
  • 1
  • 4
  • 11