I did in ngrok but it says "Failed to complete tunnel connection"
The connection to http://xxxxx.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.
Make sure that a web service is running on localhost:80 and that it is a valid address.
The error encountered was: dial tcp [::1]:80: connect: connection refused
Problems via ngrok?
-
- OpenVPN User
- Posts: 38
- Joined: Fri Aug 07, 2020 4:30 pm
Re: Problems via ngrok?
long story short, i setup a vm running openvpnas appliance and tested (internally) that clients were able to connect onto it.
set up the openvpnas clients to accept only TCP (443) connections.
i was able to install ngrok on top of openvpnas. i was able to access it via ngrok's URL. i was able to manage my users and its settings.
i was able to add the server (URL) on my openvpn connnect client. however, i was unable to connect onto it.
please help me as i am running out of ideas here
set up the openvpnas clients to accept only TCP (443) connections.
i was able to install ngrok on top of openvpnas. i was able to access it via ngrok's URL. i was able to manage my users and its settings.
i was able to add the server (URL) on my openvpn connnect client. however, i was unable to connect onto it.
please help me as i am running out of ideas here

-
- OpenVPN User
- Posts: 38
- Joined: Fri Aug 07, 2020 4:30 pm
Re: Problems via ngrok?
fixed already:
got to solve it and had to work around the big limitation of openvpn as well as ngrok.
in ngrok. i had to tunnel both http and tcp 443
authtoken: myauthtoken
region: ap
log: /var/log/ngrok.log
log_format: logfmt
log_level: debug
tunnels:
http443:
addr: 443
proto: http
bind_tls: true
subdomain: mysubdomain443
tcp443:
addr: 443
proto: tcp
however, due to ngrok's design, it assigns a fixed URL for TCP forwarding (0.tcp.ap.ngrok.io) with a random port that is bound to the tcp port.
unfortunately, openvpn connect ALWAYS forces ONLY adding the source server in HTTPS:// prefix BUT assumes it provides TCP connection.
therefore, what i did is i edit the openvpn profile (*.ovpn) with a text editor and i did this on the following lines
proto (removed)
port (removed)
remote (updated the URL to 0.tcp.ap.ngrok.io randomportnumberassignedbyngrok tcp
import that profile onto openvpn connect
then connect.
got to solve it and had to work around the big limitation of openvpn as well as ngrok.
in ngrok. i had to tunnel both http and tcp 443
authtoken: myauthtoken
region: ap
log: /var/log/ngrok.log
log_format: logfmt
log_level: debug
tunnels:
http443:
addr: 443
proto: http
bind_tls: true
subdomain: mysubdomain443
tcp443:
addr: 443
proto: tcp
however, due to ngrok's design, it assigns a fixed URL for TCP forwarding (0.tcp.ap.ngrok.io) with a random port that is bound to the tcp port.
unfortunately, openvpn connect ALWAYS forces ONLY adding the source server in HTTPS:// prefix BUT assumes it provides TCP connection.
therefore, what i did is i edit the openvpn profile (*.ovpn) with a text editor and i did this on the following lines
proto (removed)
port (removed)
remote (updated the URL to 0.tcp.ap.ngrok.io randomportnumberassignedbyngrok tcp
import that profile onto openvpn connect
then connect.