Access Tomcat from iPad - ipad

I have installed Tomcat 7 on my Macbook. The IP address of Tomcat is : 127 . 0 . 0. 1
I would like to access it from my iPad. I don't know how to do that. I ve tried this address http:// 127. 0. 0. 1:8080 from my iPad but it doesn't work.
Do you know how to do that?
Thanks in advance.

127.0.0.1 is the ip of the current computers loop-back adapter (virtual network interface; so your device can address itself in the network, without a lookup). You need to find out your MacBooks real/ipv4 ip address. Try one of these:
System Preferences -> Network
Open a terminal -> type: ifconfig |grep inet

Related

Using Beaglebone black in Window 10

I want to using beaglebone black in IOT.
My OS is window, so I use "Putty" connecting with debian.
IP address is 192.168.7.2, Port 22 and Connection type is SSH.
I want to confirm networking state so enter "ping 192.168.7.1".
Then, putty is not working.
so i adjust entering like "ping -c 2 192.168.7.1".
output is receive 0 and loss 100%.
I don't know the reason why output is like that.
I connect computer by ethernet, and beagle connecting p4.
BBB is configured by default to use the dynamic host configuration protocol DHCP, so ti will get some random IP address if you are using ethernet and not USB. However, you have some options to find it out:
You can attach a display and check the IP address asigned to the BBB;
You can connect to the BBB via serial console (although you need a specail cable for it);
You can connect your BBB via USB for the first time and configure a static address as described here and here
Attention, 192.168.7.2 is default BBB ip on Virtual ETH via USB (in Windows). You try connect usb and open SSH on 192.168.7.2:22. If fine, you can to change IP configuration on /etc/network/interfaces

Is there a way I can access my Rails Application of my Ubuntu VM from my Windows 7?

I got a Rails application (running on Thin server) running on my Ubuntu VM, how can I be able to access it from my Windows 7 OS? I already have the VM bridge option enable.
I tried using the IP address from my Ubuntu VM directly to my windows 7 browser, but nothing happens, is there a way to do that?
Yes, you can:
You need a Bridged adapter for your Virtual Machine
You need to know your VM's IP address (ifconfig | grep inet on Ubuntu)
Your VM needs to be turned on AND running the server
Then in your Windows 7 (or other computer in your local network, your smartphone for instance) you can open a browser and go to your VM's IP address + port (usually 3000).
So, the address to put in your browser might look like this:
http://192.168.1.5:3000/

Port Forwarded; Port Check says port is open but unable to connect

I have setup the Swann DVR Surveillance System. I am able to access the web client at 192.168.1.99:85 (static ip in internal LAN). I have port forwarded 85 packets to 192.168.1.99. But when I access my external ip eg xxx.xxx.xxx.xxx:85 I get unable to connect error.
I checked if the port is open in an online tool and it says port 85 is open. HEre is my port forwarding page:
Please Help me. Thanks in advance
EDIT: I have tried changing ports to 89, 9001, 8080 and no luck..
Ive finally figured out what I was doing wrong from a friend. It seems there is something called NAT Loopback (https://en.wikipedia.org/wiki/Network_address_translation#NAT_loopback) that allows you to access your public IP address from within your own network. Most routers have this feature disabled by default. And hence whenever you try to access your IP address the packets are dropped and you get the Host Unreachable ICMP packet.
Anyway to use this try to enable NAT Reflection or NAT Loopback on your router.
If you dont have that feature, you can test your system from outside the network and itll work just fine. Sorry for not reporting the answer sooner.
Yeah, same problem. As Steve Robinson said, you cannot always access your public IP from your NAT. Try running Apache and use your phone (turn off WiFi and turn on mobile data) to test if this is the case.

How could one connect their iPhone to a Mac OS X's Safari Console?

I'm using my local ip :
ipconfig getifaddr $(route -n get default|awk '/interface/ { print $2 }')
Which returns :
192.168.200.11
And I'm running a Sinatra app that can be accessed via my computer at :
http://localhost:3000
If I do on my iPhone :
192.168.200.11:3000
It times out. And the same results occur on my laptop as well when I try and connect to the same address.
How do I connect my iPhone from here so that I can see my locally running app?
Extra miscellaneous infos
From my Iphone if I go to :
192.168.200.11
It brings up my pow is installed page..
Sounds like a firewall issue on your computer. It's allowing connections to port 3000 from localhost, but not from the local subnet. However, that rule is different for port 80.
You're sure your iPhone is on the same LAN as your computer? I.e. going to http://icanhazip.com/ on your iPhone gives you the same IP as going there with your computer?

How do you host a Ruby on Rails application on a local network, so multiple people can access it?

I'm brand new to RoR and have pretty much 0 experience with it. I have been handed down somebody else's project and I need to find a way to host the application, so people can just access it locally. The application is a spider script/walker script/web scraper whatever you call it. Basically it connects to a website, logs in, retrieves certain data each day and maps it with the previous data. While on the local machine, you use it, go to localhost:3000, and you get the webpage the previous person designed. I was just wondering how I could get that page to be public for the people on our local network, so they could connect to some arbitrary IP and see the same page (it updates daily)?
What I tried doing is making the folder containing the application public to the network, but in order to use it, I would have to make everybody on the network allowed to write to it and each person would have to install RoR to use it. I want to avoid that since it doesn't seem logical, nor is it what I'm trying to do.
Looking at the code, I can reverse engineer and understand what it does, but when it comes to hosting web apps locally or something of that sort, I have never done this before. Please help!
Thanks in advance!
**EDIT
-This is all being done on a Windows 7 machine.
Since you're on Windows, open up a command line and run ipconfig to find out your local IP. It will be listed under 'IP Address'.
Tell people in your LAN to access http://192.168.x.x:3000 replacing 192.168.x.x by your IP address from step 1.
EDIT: One major thing that I missed, you are windows. On windows u could use thin and put it behind a load balancer. Although i would suggest hosting it on a UNIX machine :)
Although Running it in webrick(webrick is the application server for development i.e when u run rails s) will let other users access the website NEVER do the same for a production application. If you want to run this application in production, u need more powerful application servers like passenger. I would suggest you use it with Apache or Nginx instead of stand alone passenger. Once all this is setup others can use your application by entering the IP(xx.xx.xx.xx) also u can ask your system admin to setup a local DNS so your users need not remember the IP address always.
Description:
While starting Rails Server, we can also setup some options to configure the IP address and also the port number of the site under development environment to host the website in local network. So if we want to change the IP from http://127.0.0.1:3000 to http://192.168.x.x:port (x= 0 to 255 any one number), we can set that in Rails server command! But for this, we will need to find out our current IP address at our current network which will help us to serve the website in local network.
So at first step:
We will open our terminal on our PC. For Android user, we need to open Termux app. Then simply type ifconfig to get the IP address of our device in the current network. We will get an output like this one (Here I'm using Android device for development. So output might be something different than this one on your PC terminal but the process is same):
$ ifconfig
Warning: cannot open /proc/net/dev (Permission denied). Limited output.
lo: flags=XX<UP,LOOPBACK,RUNNING> mtu XXXXX
inet 127.0.0.1 netmask 255.XXX.XXX.XXX
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen XXXX (UNSPEC)
wlan0: flags=XXXX<UP,BROADCAST,RUNNING,MULTICAST> mtu XXXX
inet 192.168.1.103 netmask 255.XXX.XXX.XXX broadcast 192.168.1.255
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen XXXX (UNSPEC)
X= some numbers with our device credentials which is dummied with this variable
If you are using a WiFi router then we will need the wlan0 part to get our device IP. Under wlan0 section there is a subsection of inet showing our current IP! YUP, we need that IP address 192.168.1.103! This might be different for your device and network. This is the key of this mission! Now we're going to the second important step.
So the Second Step is:
That required input command to configure the IP address.
rails s -b 192.168.1.103 -p 8080
Here:
rails s for rails server
-b 192.168.1.103 for bidding the IP address for customisation from the default IP http://127.0.0.1 which is our localhost address.
-p 8080 for port setup. This part is optional. Default port is 3000.
This is the process of changing the localhost IP (http://127.0.0.1) to local network IP which will be available for other device of the same network user.
Now our rails app is available in our local network! Other users in the same network will also be able to visit the website while the server command is running. And the link will be http://192.168.1.103:8080 if you also configure the port number. Otherwise if you have used the command rails s -b 192.168.1.103 without port configuration the link will be: http://192.168.1.103:3000
Again: 192.168.1.103 was for my case, your IP address will be different for your device. That will be needed to use for your server and link address.

Resources