Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tunnel Only - No IP #1

Open
samhorne opened this issue Sep 24, 2017 · 10 comments
Open

Tunnel Only - No IP #1

samhorne opened this issue Sep 24, 2017 · 10 comments

Comments

@samhorne
Copy link

samhorne commented Sep 24, 2017

I followed the instructions, but when I check Dweet.io, only "tunnel" prints on the visual, and on the raw:

{
"tunnel": ""
}

I also noticed that the tunnel is not starting when the Pi boots; I log into ngrok and nothing is running.
What should I change?
Thanks

@hrishioa
Copy link
Owner

Perhaps ngrok isn't being established on your end? Have you tried creating a tunnel with ngrok before?

@wave100
Copy link

wave100 commented Nov 2, 2017

Same issue here - I'm getting an ngrok tunnel just fine, but neither of the dweet readouts are showing the local IP address.

Edit: There are already a few forks that fix this.

@OscarVanL
Copy link

OscarVanL commented Nov 4, 2017

Same problem for me too.

Edit: I got it working, here's how:

I edited the nomohead.sh to implement all the changes in 'CODINGMOFO's fork.

I also made a mistake when defining the location of ngrok. Instead of writing /path/ngrok, I just wrote /path/. I edited the config in /nomohead/config.cfg. After correcting this mistake the program worked as intended :)

@amrithmmh
Copy link

@OscarVanL please tell me how to get the external ip . I have tried CodingMOFo fork but it shows only internal ip but not the information i need

how to get the external ip?

@OscarVanL
Copy link

@amrithmmh
When I tried CodingMOFO's fork there were still some problems. I edited and made a fork of this repo. Try out my fork and see if it works. I use it still and external IP definitely works!

@amrithmmh
Copy link

amrithmmh commented Mar 12, 2018

@OscarVanL thanks it works. But where will i get the url to use? (maybe a dumb question)
I need the http / https link so i can directly use it. How to get that
I tried localtunnel but cannot get it working ..

@OscarVanL
Copy link

@amrithmmh
If you are referring to the Ngrok Tunnel, this is by default set to go to port 22 (the SSH port, so you would enter the tunnel into an SSH client like Putty). See this line: 'COMMAND=("${ngrok_location}" tcp -region "${ngrok_server}" 22)'
You can edit this 22 to another port, like port 80 for a http server. Then you access the dweeted address in your browser.

This might not be what you want if you just want an address associated with your raspberry pi's website. Have a look into a Dynamic DNS (there are free ones) such as no-ip.

The purpose of the tunnel is to access certain ports on your Raspberry Pi without having port forwarded them on your router. I'm on an enterprise University network, so obviously I can't port forward to 22.

@amrithmmh
Copy link

amrithmmh commented Mar 13, 2018

@OscarVanL thank you actually i do not want to use port forwarding and router
so i am using ngrok i get dweet like this https://ibb.co/if1Rhx
where will i get the link[i have changed the nomohead.sh script port 22 to 80 ]

what i am trying to do is:
i have a 3d printer and i have used octopi in rasberry pi 3,
but it has only local access i need internet access to localhost in the octopi [but not using port forwarding ]
is there any other alternative?

@amrithmmh
Copy link

update: i got it working for http link
chnages i made open nomohead.sh
change the COMMAND= something tcp something 80 to
COMMAND=("${ngrok_location}" http -region "${ngrok_server}" 80)
and
the line that searches for tcp:\ to
TUNNEL_TCP=$(grep -Po 'http://([\S]*?)"' ./tunnel_info.json ) //observe its http instead of tcp

and the link is displayed!!
thanks

@OscarVanL
Copy link

Glad to hear you got it to work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants