thelonelycoder
Part of the Furniture
From Wikipedia https://en.wikipedia.org/wiki/Ping_(networking_utility):
To test the reach ability, my a$$.
For a time now, the amtm Entware installer failed the ping test to mirrors.bfsu.edu.cn from Switzerland. At times the test went through but mostly it failed.
I have no restrictions on my routers for domains in China, nor does my excellent and nerdy ISP restrict it in any way - the one with a nerd mode toggle on their website: init7.
It bugged me but I never checked deeper as I have other things on my plate that are more pressing. Well, until now.
Yesterday, GitHub user Cryolitia made a pull request for amtm: https://github.com/decoderman/amtm/pull/30 and it really started to bother me that his change did not resolve the GFW (Great Firewall) problem.
Turns out it's not the GFW that blocks pings - they simply do not answer to ping.
I understand that some hosts have reasons not to respond to ping. But being an educational website you would expect they would freely allow it.
Their reason may be those ping flood attacks that hacker kids use these days to bring servers down? Who knows.
To solve my problem I decided to go the safe route and now use curl to determine if a web server is up and ready to serve in amtm.
curl acts and behaves just like any browser request to web servers:
With a redirect (curl -L) to one of the three mirrors behind mirrors.cernet.edu.cn, this looks like so:
In conclusion, curl IS the new safe ping command.
I will release an amtm update as soon as testing is finished.
ping is a computer network administration software utility used to test the reachability of a host on an Internet Protocol (IP) network. It is available for virtually all operating systems that have networking capability, including most embedded network administration software.
To test the reach ability, my a$$.
For a time now, the amtm Entware installer failed the ping test to mirrors.bfsu.edu.cn from Switzerland. At times the test went through but mostly it failed.
I have no restrictions on my routers for domains in China, nor does my excellent and nerdy ISP restrict it in any way - the one with a nerd mode toggle on their website: init7.
It bugged me but I never checked deeper as I have other things on my plate that are more pressing. Well, until now.
Yesterday, GitHub user Cryolitia made a pull request for amtm: https://github.com/decoderman/amtm/pull/30 and it really started to bother me that his change did not resolve the GFW (Great Firewall) problem.
Turns out it's not the GFW that blocks pings - they simply do not answer to ping.
I understand that some hosts have reasons not to respond to ping. But being an educational website you would expect they would freely allow it.
Their reason may be those ping flood attacks that hacker kids use these days to bring servers down? Who knows.
To solve my problem I decided to go the safe route and now use curl to determine if a web server is up and ready to serve in amtm.
curl acts and behaves just like any browser request to web servers:
Code:
tlc@GT-BE98-A804:/tmp/home/root# curl -IsL https://www.google.com | head -n 1 | grep 'OK\|Found'
HTTP/1.1 200 OK
Code:
tlc@GT-BE98-A804:/tmp/home/root# curl -IsL https://mirrors.cernet.edu.cn/entware | head -n 1 | grep 'OK\|Found'
HTTP/1.1 302 Found
In conclusion, curl IS the new safe ping command.
I will release an amtm update as soon as testing is finished.