Ngrok session expired (raspberry project) - raspbian

I've made a server on my raspberry and a mobile app to control it. I can connect to it when my mobile is connected to the same net, but I cannot do it outside of the net.
Actually I'm using ngrok to reach it but the session expires in 8 hours.
Is there any way to keep it on all the time I want? (or kind of, like a script that auto execute ngrok if the system detects that is not running)
And without ngrok how could I reach that server?

You can keep the ngrok on all the time by using the authtoken.
https://ngrok.com/docs#authtoken
First, go to ngrok website and login with an account. Then, go to the dashboard and get the token from Step 3 (Connect your account).
Run the command
ngrok authtoken <YOUR_TOKEN>

Related

I cannot instantly reconnect to ssh server after logout

I have a ssh server on an old CentOS 5 installation. I can connect to the server without any problems. However, if i disconnect from the server and want to login again after exiting the previous session, the server is not responding and i got a "connection timed out" error. After a while (must be between 1 and 5 minutes) i can login normally. If i then exit the session, the same timeout happens again.
From the network where the client resides, i can connect to other ssh servers without any problems, so i dont think, this is a firewall issue.
Any suggestions, where i can look for the problem?
I tried to login with key instead of password and i stopped the fail2ban service on the ssh server. Both without any success.
I solved my problem:
There is a iptables rule, which is limiting the connections per ip to one attempt per minute. I have whitelisted my ip and now there is no delay when reconnecting.

Is it possible to host a Minecraft server on GitHub Codespaces?

I downloaded the Fabric server jar file to a GitHub Codespace and am able to run the server without trouble. However, I am unable to determine the IP needed to connect to the server. Starting the server automatically forwards port 25565 and I make the port public. However, I can't figure out which IP to paste into Minecraft to connect to it. How do I figure out the IP of the server?
I found an answer thanks to inspiration from this question.
Steps:
Set up the fabric server jar as you normally would, but on the codespace. Start the server.
Split the terminal so one is running Java (server console) and the other is running bash.
Install ngrok via npm i ngrok --save-dev.
Once the server is finished setting up, run the command ./node_modules/.bin/ngrok tcp 25565.
Copy the ip shown under Forwarding (minus the tcp:// part and including the port). This should look something like 4.tcp.ngrok.io:17063.
You now have the ip of the serve!
Note: The free version of ngrok has URLs which change every time, as well as a limit, but for small-scale servers this shouldn't be an issue. You are also limited by the free codespace usage limit GitHub puts in place. However, you can easily get around this by creating a secondary account that you use codespaces on only for the server.

Can't connect to localhost after expo update

I use expo and my iphone for create react-native application locally. A few months ago all was good. I used my local ip address for connecting to my local backend server. But after update expo started generate url as exp://r2-asw...exp.direct:80. Now I always get a connection error. I even can use my api via browser using my ip and port.
If I choose LAN instead Tunnel there is an infinity loader and get an error "There was a problem running the requested app. The request timed out"
The problem was in mac Brandmauer

Activating a VPN on Google Cloud Compute VM is terminating my connection

I have spun up a Google Cloud Compute virtual machine. It's a vanilla Windows Server 2016 image, and I can log in and see the desktop. I do that by downloading the RDP file and running it.
Due to a license manager for software I'm installing, I need to VPN to my own network. In "Settings -> Network", I add a new VPN connection (using the same creds I use on my machine) and click Connect. It makes an initial connection, verifies my credentials, but during the final stage, my RDP connection to the GCP VM ends.
What is really strange is that, sometimes, I can reconnect successfully after a few minutes and the VPN connection was successful. Sometimes I can't reconnect.
Any ideas?
The VPN connection added as such will be a force tunneled VPN which then adds a default route over the VPN interface on the VM disrupting your connection. The easiest way for maintaining the connection would be to do either of 2 things
Make the VPN split tunneled and add a route for the licensing box. You can do this by using the Set-VPNConnection Powershell commandlet and then adding a route using the route add command in an administrative command prompt
Add a more specific route for the IP Address by which u access the VM using the route add command
UPDATE: Simply setting the VPN to use split tunneling in PowerShell solved the problem.
Use: (Replace "VPNsName" with your VPNs Name)
Set-VpnConnection -Name "VPNsName" -SplitTunneling 1

SSH Tunneling not working properly

I created an SSH tunnel via Putty and configured firefox to use it. Everything is working properly.
I have a spare AWS server that I am using for this purpose. I have verified that firefox is indeed using the proxy by checking my IP address.
Now, I want to be able to use this tunneling proxy to access Facebook which is blocked at my workplace.
When I try to access Facebook via firefox with the tunnel, it still says that facebook is blocked?
What is going on here?
You can reach the same effect, i.e. to see facebook page and everything is forbidden in your network, by using Tor Browser