i'm trying to share localhost with ngrok - laravel

i'm trying to access my localhost via ngrok, and my project is Laravel 5.3
The connection to http://****.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:8000.
how can i solve this issue ?

Kindly check if you tunnel same port which is used by your application like 8000.

Related

Failed to listen on 127.0.0.1:443 (reason: Permission denied) [duplicate]

This question already has answers here:
OSX: Failed to listen on localhost:80 (reason: Permission denied)
(4 answers)
Closed last year.
hope you are all good,
I 'am working on a react native app for android, and i need data from my laravel API, the route works fine when i test it with Postman but on my mobile app i got an Error : Network Error.
I have been told that is because i need to put my laravel project on https so i tried
php artisan serve --port=443
but i got this error
Failed to listen on 127.0.0.1:443 (reason: Permission denied).
i'am really stuck and i don't know where the problem is...
Thank you all for you help mates
You've got a bunch of misconceptions interacting with each other here.
Misconception: Running on port 443 will give you HTTPS
Your attempted solution is to make your server listen on port 443, which is the default port for HTTPS.
It is failing because you are running the server as a user that doesn't have permission to listen on that port.
While you could solve that by running with admin privileges, that will just mean you are running an HTTP server on the default HTTPS port. Anything connecting to https://127.0.0.1/ will get an error because it will try to establish an encrypted connection and the HTTP server will be confused.
As far as I can tell, Artisan doesn't support HTTPS directly and you have to use a proxy server instead.
If you were to go down that route, then you could run both Artisan and the HTTPS proxy on any port. You can port a port number in an https:// URL just as you can with an http:// URL.
Misconception: You need HTTPS
You're getting a Network Error error when you try to connect from the mobile app.
While there are some things which require HTTPS, just loading a web page isn't one of them, and the things that do generally are quite explicit about requiring HTTPS in their error logs.
The real cause is most likely because the server is listening on 127.0.0.1 — localhost. It isn't accessible from a different computer.
Solutions
Listen on a different Network interface
You can listen on a non-privileged port on a LAN-facing IP address and then any device on your LAN can connect to it.
php artisan serve --host 192.168.1.101 --port 8000
Make sure you replace the host with an IP address belonging to your computer!
Use a proxy
A service like ngrok will expose your local (listening only on localhost) service on the public Internet (tunneling through any NAT on your router if needed) making it accessible to just about any device.
It can wrap it in HTTPS at the same time if you like.

How to connect laravel with Firebird database? [duplicate]

I'm trying to connect to a remote Firebird database "test" (alias already added). It is not an embedded server, and is installed on VM with IP 192.168.1.147.
Here is my connection string:
User=sysdba;Password=masterkey;Database=test;DataSource=192.168.1.147
However I got an error:
FirebirdSql.Data.FirebirdClient.FbException (0x80004005): Unable to complete network request to host "192.168.1.147". ---> Unable to complete network request to host "192.168.1.147".
I've done some research on that but haven't got a clue yet. Some help needed. Thanks
My IP address is 192.168.2.108, and I can ping that server IP successfully
Make sure that
Firebird is running
Firebird is listening on port 3050 on the specified IP (or on 0.0.0.0)
Your firewall allows access to port 3050
You're using the correct host name
For Linux, the Firebird port is closed by default. You need to modify RemoteBindAddress in /etc/firebird/2.5/firebird.conf from
RemoteBindAddress = localhost
to
RemoteBindAddress =
and restart service.
Make sure you have excluded tcp port 3050 in VMs' firewall.
Ok. I think your connection to firebird is faililing because the firebird client looks up the network service file by name and does not find gds_db in the services file.
If your connection string refers to the host by using IP, the Client might fail to identify it because it gethostbyname() and not by IP
Manually include this in the file and you should be fine.
C:\windows\system32\drivers\etc\services

No response while using ngrok to expose a local web server

I'm trying to expose my local web server IIS Express using ngrok.
Followed steps from https://ngrok.com/docs and fired the tunnel, but can't get response.
Screenshot - ngrok fired
I'm using Visual studio via IIS Express. (Debug mode, local website works well.)
If local website not started, access to XXXXX.eu.ngrok.io will get error directly:
Failed to complete tunnel connection
The connection to https://2713343d.eu.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:44320.Make sure that a web service is running on localhost:44320 and that it is a valid address.The error encountered was: dial tcp [::1]:44320: connectex: No connection could be made because the target machine actively refused it.
No errors shows on Ngrok's Web Interface too.
Is there any way to check where the problems are? or see ngrok's log?
Indeed it works with http, but it is strongly recommended to work with https, so you should properly start ngrok in order to work with https:
ngrok http -host-header=localhost https://localhost:{your_IIS_express_port}
After this you should be able to access your URL:
https://{id}.ngrok.io
Credits
Try make your service as http, not https.

Secure communication on tclhttpd server fails

I have a tclhttpd server and I am trying to communicate it using secure server (SSL). When I start my server, I get a notification that:
httpd started on port xxxx
secure httpd started on SSL port yyyy
When I try to access the normal HTTP (http://localhost:xxxx), I can access the web folder. However, when I am trying to access the web server through a browser using secure port and https (https://localhost:yyyy) it shows:
The connection to localhost was interrupted while the page was loading.
I've also used the Httpd_SecureServer call to initialize the server but i still cannot connect using ssl.
What am I doing wrong here? any ideas?

Socket.io not accessible via domain name

I have a socket.io node js application running on server on port 3001. When I access that socket connection via browser http://ip-adress:3000/socket.io/?EIO=3&transport=polling&t=1502735738006-0 It works perfectly fine.
I have a VPS on vultr with Ubuntu 14.04 x64
And I have a domain jackpotrolldice.com pointing to that server.
When I try to access via browser like http://jackpotrolldice.com:3000/socket.io/?EIO=3&transport=polling&t=1502735738006-0 then it doesn't work and connection timed out error comes.
As I am new to nodeJS and socket.io. So please guide & help me!Thank you in advance!

Resources