1

i have a website i'm developing in Laravel running on a Homestead VM, and i'd like to be able to see it on both my and one of my colleague's phones when i'm trying to design the responsive Mobile parts of it.

I'm trying to use xip.io to achieve that, what i've done is, i looked at my private IP address from my Windows network settings page. (198.169.100.21)

I've defined in my HOSTS file that the domain dev.198.169.100.21.xip.io should direct to 10.10.21.1 (ip of my vagrant instance running on my machine)

Then, i SSH into my Vagrant box and tell NGINX to route all requests to dev.198.169.100.21.xip.io to my project.

I go to that address on my IPhone, it works, so far so good, i just need to make sure i'm logged into the company's access point and i'm good. The problem is that my colleagues can't see the site on their own mobile phones, even though they are using the same access point as me...

Am i missing something here? I hope someone who's used xip.io in the past can help me out with this. Thank you in advance! :)

João Serra
  • 509
  • 9
  • 21
  • You are confused about Private IPv4 addressing because `198.169.100.21` is _not_ a private IPv4 address. Private IPv4 addresses are defined in _[RFC 1918, Address Allocation for Private Internets](https://tools.ietf.org/html/rfc1918)_. – Ron Maupin Feb 13 '17 at 17:04
  • @RonMaupin I followed what is written here http://www.howtogeek.com/117371/how-to-find-your-computers-private-public-ip-addresses/ If this is incorrect then do you know how i can get my actual private IP address on Windows? Or Mac if you don't know about Windows. I'd really appreciate it, it worked fine on MY phone, which has a different IP of it's own right? Doesn't make sense... It should've worked on others as long as they were connected to the same network... – João Serra Feb 13 '17 at 21:18

2 Answers2

0

Sorry for directly answering here as I cannot make a comment based on my reputation.

In my case where I want to access my vagrant machine from any other device aside from my host machine (connected in the same access point), I do a BRIDGED connection by adding another adapter in the Vagrantfile, instead of using only a NAT and host-only adapters. But I guess you may have tried or not like that idea?

I have no idea how xip.io works, but checking its website is it works like charm.

jck
  • 321
  • 5
  • 21
0

I fixed the problem, the issue was dumb, i forgot to add port 8000 on my mobile phones, Homestead uses port 8000 by default so you need to add it as well.

dev.198.169.100.21.xip.io:8000
João Serra
  • 509
  • 9
  • 21