How to open localhost from another device on my network? - ruby

I made Sinatra small App to help me transfer files from my phone to my pc and now I'm trying to open it from my phone and can't access, what should i do?

I use ngrok
$ ngrok http 3000
And it gives me
ngrok by #inconshreveable (Ctrl+C to quit)
Tunnel Status online
Version 2.1.3
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://320e69c0.ngrok.io -> localhost:3000
Forwarding https://320e69c0.ngrok.io -> localhost:3000
Then I can use one of those ngrok.io urls anywhere in the internet.

start your application with -o 0.0.0.0 option.
type ipconfig (windows) or ifconfig (linux/mac) in your terminal application and get local ip address of your host device (e.g. 192.168.1.x). then on your phone, open browser and type that ip (192.168.1.x) and port (by default 4567, full form 192.168.1.x:4567) to access your sinatra application.

Related

How to configure genymotion to work with proxifier and tor?

I want to make genymotion's android phone's internet to work with tor proxy.
I added
Proxy server: 127.0.0.1:9150 - To access Tor port
Rule player.exe with 192.168.58.* port with Virtual Box only network action. To isolate genymotion -> virtual box communication.
Genymotion's phone runs correctly, but without internet. How should I route 5555 wifi port for adb.exe to access internet? Got 10049 error from Proxy SOCKS5 127.0.0.1 via Virtual Box host-only network.

ERROR When Accessing a Local Website from another Computer on Same Network

I have a Visual Studio project that I have setup through IIS. I can access that website locally (computer A) via chrome with no issues. I do not have to have VS open or debug the project.
I have gone ahead and setup my IIS to have the following bindings...
type: http / host name: work.local / port: 80 / ip address: *
type: http / host name: / port: 80 / ip address: "my computers IP address"
I used to be able to access the website from another computer (computer B) on the same network without problems, but now nothing. If I enter the computer A's ip address on computer B via chrome; I get the IIS7 welcome screen/image. If i proceed to add the rest of the URL, I get a "This site can't be reached 'computer A's IP Address' refused to connect. ERR_CONNECTION_REFSUED".
I also have port 80 setup to allow all incoming connections.
Any idea's or things I can try to resolve this?
Thanks!
Many approaches to isolate the issue.
Please add a binding with hostname as blank,IP address * and port 80 - **with this binding,you should be able to access the site using http://localhost, http://machinename, http://fqdnmachinename **
Also check your firewall.Make sure firewall does not have any rule or completely turn off firewall and verify
Try to access the with fully qualified name(FQDN)
Check Event logs for system and application events
Capture network trace in the chrome or IE developer toolbar. May be you are getting a redirection from website.
You can also verify if your site is listening on all IP address on port 80 with following command
netstat -ano | find ":80"
This command should list process with I'd 4 listening on port 80 .
Hope this helps!

Connect to a locally built Jekyll Server using mobile devices in the LAN

After using jekyll serve on one machine, a WEBrick server is set up and the site can be accessed from localhost:4000 on this particular PC.
However, I'm wondering how to access this web server from other machines in the LAN, especially for mobile devices? I'm trying to test the jekyll site on mobile devices before pushing the code to Github.
Try jekyll serve --host=0.0.0.0 when you invoke Jekyll on the command line.
That will make Jekyll's HTTP server bind to all available IPs, rather than just to localhost.
You can also add this to your _config.yml with host: 0.0.0.0. GitHub will simply ignore this when you push, so it's safe to use if you don't mind having your work openly accessible on your network.
Without --host=0.0.0.0 Jekyll will output something like this when you start up:
$ jekyll serve
[...]
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
But with --host=0.0.0.0 (or host: 0.0.0.0 in _config.yml) you'll notice that it's listening on all interfaces (represented by 0.0.0.0) rather than just listening on the loopback interface (represented by 127.0.0.1)
$ jekyll serve --host=0.0.0.0
[...]
Server address: http://0.0.0.0:4000/
Server running... press ctrl-c to stop.
If you still cannot access your server then there might be a firewall stopping it. Temporarily disable your firewall, or add a port forwarding rule for port 4000.
Once Jekyll is appropriately listening on all interfaces, you can access this from your mobile device using your LAN IP address (retrieved from something like ifconfig or ipconfig depending on your operating system).
Assuming your mobile device is connected to the same LAN as your development machine.
Assertain the LAN IP address of your development machine. Usually something like: 192.168.0.XXX. Where .XXX is the unique last 3 digits of your dev machine's LAN IP.
Point your mobile device's web browser to: http://192.168.0.XXX:4000
That's how I do it on my laptop and iPhone for Jekyll dev.

Is it possible to connect to Apache on my desktop from my phone while using Chrome Remote Debugging?

I'm doing this (Chrome Remote Debuggin): https://developers.google.com/chrome-developer-tools/docs/remote-debugging
I'd like to be able to access localhost or any of my vhosts (via apache on my desktop) from my phone so that I can debug a local site.
Is there ANY way to do this?
Thanks so much!
Do I understand correctly that you are running Apache on a workstation and want to connect your phone to a website hosted on it?
Yes, that is possible. The simplest method is to join your phone to the same network (WiFi) as your workstation and connect your phone to http://IP-ADDRESS-OF-WORKSTATION. Then use the Remote Debugging as usual.
Alternatively, you need to configure your WiFi router to enable port forwarding. The basic idea is your WiFi router controls traffic between your private home network (where your workstation is) and the public Internet (where your phone is), and port forwarding allows inbound traffic from the Internet to be routed into your private network.
Here's the configuration page for my WiFi router. My workstation's private IP address is 192.168.1.5 and I'm running Apache on the default port 80. If my public IP address was 8.8.8.8 then I would enter http://8.8.8.8:3000 in my phone's browser, and the router would redirect the request to my workstation at 192.168.1.5:80.
In either setup, you'll need to find your workstation's private IP address (e.g., use "Open Network Preferences" from your WiFi status icon on Mac OS X). You can find your WiFi router's public IP address by just googling "my IP address" from your workstation.
Obviously the first method (placing your phone and workstation on the same network) is quite a bit simpler. Port forwarding can be tricky to debug, and the configuration is slightly different for every router. Do post follow-up questions if you get stuck somewhere.

setting up home ftp server using filezilla

I googled, followed all the instructions but still stuck, and unable to create a home ftp server.
My internet is from dsl modem -> vonage router -> wifi router
FileZilla server ip is 127.0.0.1 and it works fine when tried from command prompt. But I need it to be accessible from outside.
I enabled ftp on wifi router's web settings page using virtual server setting.
I am stuck at this point, I don't know what else to do further. Any help is greatly appreciated.
Also, if you are planning on accessing your server remotely, (not in your network) you will have to enable port forwarding on your router. (Use the ip address of the machine running the server and use port 21) Otherwise, you only be able to connect while in your LAN.
This pretty much summarizes your needs(via lifehacker.com)
If you're FTP'ing across your home
network (like from your upstairs PC to
your bedroom PC), you can reach the
server by using its internal network
address (most likely something like
192.168.xx.xx.) From the command line, type ipconfig to see what that address
is. If you want to log into your FTP
server over the internet, set up a
memorable URL for it and allow
connections from outside your network.
To do so, check out how to assign a
domain name to your home server and
how to access your home server behind
a router and firewall.
Original Article
How to assign a domain name to your home server
How to access a server behind a router and firewall
You need to be able to access your internal network from the internet. Consider using a service like dynDNS if your router supports it.

Resources