How to Test Network on Linux Web App with Limited Tools by info.odysseyx@gmail.com October 18, 2024 written by info.odysseyx@gmail.com October 18, 2024 0 comment 18 views 18 Some Linux web apps may require testing the network, but the customer’s VNET does not allow external connections and the tools available in the blessed image are limited. This tutorial shows how to work around this limitation by downloading the required binaries (e.g. tcpping) from the external environment and then transferring them to the restricted environment using base64 encoding. index: Preparing binaries in a network accessible environment Binary transfer to restricted environments Run binaries in restricted environments conclusion Preparing binaries in a network accessible environment Step 1: Find an environment with Internet access and use the wget command to download the required binaries (in this case tcpping) or other required binaries. wget https://pingpros.com/pub/tcpping Step 2: Since we are in a restricted environment and do not have direct access to the internet, we will convert the binary to base64 format. If your binary size is less than 1MB, you can transfer it using Terminal. base64 tcpping > tcpping.txt ; rm tcpping Step 3: You now have a tcpping.txt file containing the base64 encoded binary. Displays the file contents so you can copy and paste them later in a restricted environment. cat tcpping.txt ; rm tcpping.txt Binary transfer to restricted environments Step 1: If you are in a restricted environment (one without access to an external network), paste the base64 encoded binary into a new text file and save it. Save it as tcpping.txt using the following command: echo "YOUR_BASE64_HERE" > tcpping.txt Replace YOUR_BASE64_HERE with the contents of the base64 encoded tcpping.txt copied from a network accessible environment. Step 2: Decode the base64 encoded file back to binary using the following command: base64 -d < tcpping.txt > tcpping chmod 755 tcpping Run binaries in restricted environments Step 1: Test your local network by running the binary. For example, you can ping the loopback address (127.0.0.1). ./tcpping 127.0.0.1 Step 2: Check the network test results to verify that the tcpping binary is working properly. conclusion The following steps will allow you to successfully transfer and run the binary in a Linux web app environment that does not allow external Internet access. This method uses base64 encoding to move small binaries into restricted environments for network testing or other purposes. This approach has some limitations, except that the overall file size is not too large. You should choose a static binary with no dependent libraries, preferably a single file like nslookup or dig. You must ensure that the file source does not contain malicious code, and you must not sacrifice system and data security for convenient transfer. Likewise, if your operating unit is a company, you should pay particular attention to whether IT imposes restrictions on its actions. Source link Share 0 FacebookTwitterPinterestEmail info.odysseyx@gmail.com previous post Exciting Business Development Sales Job Opportunities at Pi2 Square Private Limited in Bangalore next post New features for Azure Virtual Desktop for Azure Stack HCI You may also like Bots now dominate the web, and this is a problem February 4, 2025 DIPSEC and HI-STECS GLOBAL AI Race February 4, 2025 DEPSEC SUCCESS TICTOKE CAN RUNNING TO PUPPENSE TO RESTITE January 29, 2025 China’s AI Application DEPSEC Technology Spreads on the market January 28, 2025 What is a real -life Skynet in creating the Stargate project? January 27, 2025 Tech Mix Key to Saving Ailing Federal Broadband Program: RPT January 22, 2025 Leave a Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.