Connecting to localhost on mac with an ipad - macos

I would like to connect an ipad to localhost:5000 on my macbook. The purpose is that I would like to test how my website looks on the ipad. I followed the steps I found on numerous websites, meaning
I got the name (or ip address) of the macbook with
ipconfig getifaddr $(route -n get default|awk '/interface/ { print $2 }')
which gave 192.268.42.20. So this is the internal ip address within the network created by my rooter. My ipad is also within that network.
I turned off the firewall on the mac. I did not think that is necessary, but I did it anyway.
I went to System Preferences -> Sharing -> enabled Remote Management (here one can find the computer name, but it doesn't make a difference whether I use the ip address or the computer name)
Now I should be able to connect to the localhost on the mac with
http://192.168.42.20:5000
but this does not work. I get the message
This web page is not available
I use a Mac book running High Sierra, 10.13.6. Any idea what I might do wrong?
EDIT: Still no luck with this, but I got something working with
ngrok http 5000
see https://ngrok.com/docs. This works for what I need...

As long as the devices are on the same network, that should work. If they are not, you would have to enable port forwarding.
Try restarting both devices, then rechecking the IP address.
Make sure the server is running with no errors.
Also verify that you can access the page from the MacBook itself.
Aside from that, I don't know why it would not be working.

Related

How can I access a website on a Local Network in an OSX environment

So I have a website that I created locally but I would like to have other team members access it. I would also like to test my site using my iPhone for testing purposes. Th thing is when I check the Xip.io (LAN only) option (shown in the image below) a URL is displayed in the empty box below it. The problem is that when I use that URL the Xip.io URL in the browser of my iPhone. Nothing displays. Is there an easier way to make my website accessible from other machines locally? Is there a file that I need to edit or are my changes correct?
Thanks
Update
I'm using my internal IP. I can access my site with my laptop but other computers connected to my network cannot access my website. I figure that maybe I need to make a change to my httpd.conf file?
Found a solution! Since I'm working in OSX
Here are my steps:
Go to System preferences Selected Network
Select Wifi (since I'm connected via Wi-fi)
Clicked on the Advanced button
Click on the TCP/IP Tab
Copy or write down the IPv4 Address:
Then
Go to to PHPAdmin
Select the database tab
Select your database
clicked on the options table
under option_name Change both values (siteurl and home ) in column option_value to the IPv4 Address you copied from System preferences
Opened MAMP Pro
entered the same IPv4 Address in the Host IP Address Field
Restart server
Helped me
I'm not sure if I understood correctly, but you can use the app Fing - network tools on your phone to scan the network and get all IP addresses on it, your computer should be one of them (on regular protection networks).
What I think what happened is that that URL is not resolved correctly on other devices, you are probably giving them your external ip, try to use the app I mentioned, find your computer and attempt to connect to the IP address you find in that app. That IP will be your internal ip address, which is what you need.

Putty error : Unable to open connection to hostname : Host does not exist

I am using Putty to ssh into some of the servers that I work on. I am able to connect all others except the one. Although I was able to connect to it before. Whenever I try connecting to it, it always give me error:
Unable to open connection on myhost: Host does not exist
My firewall is off and I have even re-installed putty but that did not fix it. When I tried connecting to the same server using putty on some other windows system, I was able to do so. I searched regarding this on Internet but did not find much relevant.
I am running putty on Windows 7.
What can be the possible issue?
As I understand you have three computers involved. At the same time one connection is working and the other one fails. So we can exclude that the ssh daemon on your linux box is hanging.
In lack of knowing their real names I will call your computers linuxbox (this is the computer you want to ssh into), win7ok (that is the computer that you are able to ssh from using putty) and win7fail (that obviously is the computer you can't connect from).
Please do a tracert from both Win7 computers:
tracert linuxbox.your.domain
tracert linuxbox
Add the results to your question as it will help us find out what is happening.
Perhaps it is also a good idea to determine the ip address of the linuxbox from win7ok:
ping linuxbox
or
nslookup linuxbox
Then try to connect from win7fail by using the ip address of the target computer, perhaps it is only a DNS problem (which might be as nmap is failing too).
To make all of this easier to understand for us please provide the real names of the computers as you use them in putty.
For me the problem was with the Url of the reposity. Check remote URL. It must start with git#github.com, not https://.
I used nslookup and then used the ip address it gave me to connect and it worked
I had a similar problem with GitExtensions. The solution was to remove the https url and replace it with git#gitlab....
WRONG:
GOOD:
I just went through this. I have a Cisco VPN I need to use to get through to the Linux machine I wanted to login to and check.
No Putty session would get through using the machines name.
An nslookup on the windows machine yielded the correct address.
I too connected right in via the ip address.
I tried to Google the error and it failed, so I suspected the wireless.
Disconnected and reconnected my WiFi and all was good.
I did it fast enough that open connections stayed open.
And new connections refering to DNS names worked fine.
Seems like maybe some cached DNS addresses were stale.
Your DNS cache stores the locations (IP addresses) of web servers that contain web pages which you have recently viewed. If the location of the web server changes before the entry in your DNS cache updates, you can no longer access the site.
Following CLI command will do the trick:
ipconfig /flushdns

Cannot access WCF Service running inside Parallels from outside

I have a WCF service which is working perfect inside of my Parallels Bootcamp VM
However, I cannot get this working from outside, i.e. the MAC that parallels is running on
The IP address is shown as 10.211.55.3 using IP Config
The service is running via port 17377 so I am trying to use the URL 'http :// 10.211.55.3: 17377/CalculatorService.svc'
It appears as though this is normally caused by firewall issues
However, the firewall is off on both the windows VM and my MAC
Has anyone got any other ideas about what the problem could be?
I have tried this with another WCF service and still have the same problem, the 10.... IP address errors with invalid hostname
Paul
This has now been fixed thanks
If anyone else ever gets a similar issue to this the easiest thing is to change the parallels network to host only although this does disconnect the internet
I had to do that as well as modifyibg the host file on both the vm and mac to link the machines IP address to an specific host I gave it

View LocalHost Via iPad

I would like to view my locally hosted website via an iPad or other mobile device.
I have seen that many other people have succeeded in doing this and am unsure where I'm going wrong.
I have window 7 with iis. I have tried my_ip_address/index.html in safari with and without windows firewall disabled.
I think port 80 is correct, however I also use phpmyadmin which uses port 3306 if that means anything. (I did try this though my_ip_address:3306/index.html but nothing changed)
I have also tried using the IPV4 address which gives me this error:
Not Found
HTTP Error 404. The requested resource is not found.
And IPV4 DNS Server (which is an almost identical ip address apart from the last digit) and this gives me the following error:
Object Not Found
The requested URL '/index.asp' was not found on the RomPager server.
Return to last page
I'm currently running around in circles so any help is much appreciated. Thanks
I do this without any problems.
Try http://192.168.xxx.xxx:6969 on your laptop, does it work? Try it again with the iPad (obviously using your laptops ip address which I'm guessing looks like the above)
I've found it can be sensitive about the port number but I don't know why, 6969 did work for me.

I am not able to host my own Web site

I have a high speed cable internet connection at home. I have D-link router, and I connect 2 computers, one is a desktop running Windows XP, the other is a laptop running Windows 7. I am perfectly able to use internet on both computers.
Now I want to host my personal web site from my home computer. I have already built the site that is running on my home network. Now I want to make it accessible from internet. I did all the procedures to open the appropriate ports on my router, allow incoming connections, and port forwarding setup, using the router's guide : http://www.dlink.com/-/media/Consumer_Products/DIR/DIR%20826L/Manual/DIR_826L_MANUAL_EN_UK.pdf .
However I am still not able to see my web site from public internet.
When I try to go to my site using my local IP address (192.168.0.103) or computer name, the site is loaded on other home computer, but when I try the same using my public IP address (found with "what is my ip" on google search), I get "Page cannot be loaded" error.
Can someone please help me telling what I am doing wrong, and how the problem can be fixed?
Thanks in advance.
Are you attempting to hit your WAN IPaddress from inside your house, aka, on the lan that the WAN would hit? It could be NAT Reflection/lack thereof getting in your way. Make sure you're trying to hit your WAN IP from a network outside of your local network. If you have a phone, turn off wifi, and use your phone.
Besides that, you've listed all of the basic steps necessary. Should the above not be the problem, I would start by checking your PCs firewall. In particular on Windows 7 checking to make sure you click real hard on that "public networks" button. Then just try and ping port 80, not load the webpage. If you can't ping, it suggests configuration issues with your router/connection. If you can, there's just some configuration that's effed up with your webserver.

Resources