Automatic Ngrok port forwarding using Ngrok Mailer

    • Automatic Ngrok port forwarding using Ngrok Mailer

      Hello guys!

      Here is guide how to enable Ngrok Mailer, which will port forward your server web-gui to internet without port forwarding using router!

      So, let's begin.

      • [b]Your script file configuration should look like this (excluding example emails and SMTP credentials):[/b]
      forwarding_ip="" # IP of device, server or whatever, which NGROK will forward, leave blank for localhost
      forwarding_port="80" # Port to forward
      forwarding_connectiontype="http" # Forwarding type http or tcp (See more in ngrok documentation)
      email_addr="" #Email address for sending Ngrok address in case server or device rebooted
      ssmtp_root="" #Email address which be used to sent emails
      ssmtp_mailhub="" #SMTP address of mail server
      ssmtp_authuser="" #Authentication for SMTP server
      ssmtp_authpass="passwordforgmail" #Authentication for SMTP server
      ssmtp_usestarttls="YES" # Set YES or NO to enable or disable STARTTLS
      ssmtp_autoconfig=true #true or false to disable overwriting ssmtp.conf
      logging=false #Enables logging to same folder where is script
      ngrok_path="ngrok" # Custom path for Ngrok, leave ngrok if file is in same directory as script. BONUS! NgrokMailer will download file if it is missing
      checkfordependencies=true # Checking for all dependencies on startup

      • If your server processor is not 64bit, download ngrok file manually matching your CPU, and place it in same folder, where is script located
      • As Documentation Says:
      • Make script run on startup:nano /etc/rc.local
      • Then paste this below into rc.local:
      • ./path/to/folder/
      • Relpale /path/to/folder/ with your path, where is located script.
      • And restart server. If you receive email, it works!
      • If not, check for correct SMTP Settings, and try to run script from ssh, while server is running, so you know if problem was, that script is not starting on boot.

      I hope this tutorial will be useful.

      Developer From Jokela
    • Users Online 1

      1 Guest