You’re not receiving notifications from this thread.
Allow lvh.me with my ISP router
Hi, so I got a new ISP and when I try to use the lvh.me I get lvh.me’s server DNS address could not be found. I have no Idea what to setup in the ISP router to let the lvh.me use the correct IP 127.0.0.1.
If any one knows how to allow access to the localhost IP with the lvh.me
Are you getting the error from the same computer running your server, or are you trying to access it from another computer?
If trying to access from another computer on the same network, the easiest thing to do is update that computers host file to point to your rails computer's IP address. So let's say the IP address for your rails box is
192.168.1.5, on your other computer you'd update the host file to something like:
Check out this resource for how to update your host file depending on the OS you're on: https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
From there, you may need to open up port 3000 on your router. You'll have to log in to your router and setup the port 3000 to forward to your rails box IP address.
And just for clarity,
127.0.0.1 is a loopback address that only pertains to the current box you're on. Check out https://www.lifewire.com/network-computer-special-ip-address-818385 for more details. So if you're on another box trying to access your rails box, you wouldn't enter
127.0.0.1, you'd have to enter that box's IP address.
It looks like there some cases where your router could be stubborn with local addresses. Have you tried disconnecting your rails box from the network all together and then seeing if you can access lvh.me? That should work if it's related at all to your router.
If it does work, try updating the host file as mentioned in my previous post on your rails box the same way, just use
127.0.0.1 instead of the
192.168.1.5 address, and then ultimately the actual IP address if it still balks at localhost
I made a test and use my phone hotspot and I can use the lvh.me with no problem.
So ill will follow your comments and let you know what happen
Hmmm, well Jacob's suggestion on editing your /etc/hosts file is probably your best bet.
Unfortunately for your situation you're going to have to work in a hacky way.
If you're on Windows, use Notepad++ to edit your host file. By using Notepad++, as long as you don't close the tab that the host file is being edited in then everytime you relaunch Notepad++, the host file tab will be opened. Then, just stack your subdomains:
192.168.1.5 lvh.me sub1.lvh.me sub2.lvh.me sub3.lvh.me
Not ideal, but it works.
Beyond this, you could try setting your routers DNS to use Google DNS -
22.214.171.124 - this may or may not work. You could also try updating your computers DNS to use Google as well. This should bypass your ISP's DNS... but no guarantees...