DEV Community

Cover image for utilize NGROK for Intranet penetration(内网穿透)
YYT-0901
YYT-0901

Posted on

utilize NGROK for Intranet penetration(内网穿透)

linux

  1. register & login ngrok account
   https://ngrok.com/
Enter fullscreen mode Exit fullscreen mode
  1. Install ngrok via Apt with the following command
   curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
     | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \
     && echo "deb https://ngrok-agent.s3.amazonaws.com bookworm main" \
     | sudo tee /etc/apt/sources.list.d/ngrok.list \
     && sudo apt update \
     && sudo apt install ngrok
Enter fullscreen mode Exit fullscreen mode
  1. Run the following command to add your authtoken to the default ngrok.yml configuration file.
   ngrok config add-authtoken <xxx>
Enter fullscreen mode Exit fullscreen mode

<xxx>在官网查看

Setup - ngrok

  1. deploy your app online
   ngrok http 80
Enter fullscreen mode Exit fullscreen mode

写的是你要穿透的ip

ngrok http 8080
  1. check response message
   Session Status                online                                                                 
   Account                       YYT-0901 (Plan: Free)                                                  
   Version                       3.35.0                                                                 
   Region                        Asia Pacific (ap)                                                      
   Latency                       23ms                                                                   
   Web Interface                 http://127.0.0.1:4040                                                  
   Forwarding                    https://unpurposing-aiko-undiscernably.ngrok-free.dev -> http://172.29.

   Connections                   ttl     opn     rt1     rt5     p50     p90                            
                                 4       0       0.00    0.00    30.23   65.39
Enter fullscreen mode Exit fullscreen mode
https://unpurposing-aiko-undiscernably.ngrok-free.dev

就是外网可以访问的地址

Top comments (0)