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 8 views 8 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 How to strengthen AI security with MLSecOps December 6, 2024 The Sonos Arc Ultra raises the bar for home theater audio December 5, 2024 Aptera Motors will showcase its solar EV at CES 2025 December 3, 2024 How Chromebook tools strengthen school cybersecurity December 2, 2024 Nvidia unveils the ‘Swiss Army Knife’ of AI audio tools: Fugato November 26, 2024 Nvidia Blackwell and the future of data center cooling November 25, 2024 Leave a Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.