On Monday 08 December 2003 14:52, Nikhil Joshi wrote:
Hi! it seems that my ISP ( LAN based internet ) has blocked pinging of internet hosts. I am unable to ping google,yahoo etc.
Same at my isp (incable). Seems that they were being flooded, so in their wonderful world they blinfold every body so that the light does not hurt the eyes.
I need it to check whether I am connected to internet. Is there any other way to check if I am connected to Internet ?
Also how to find out the current IP address of my PC ? /sbin/ifconfig does give the IP address, but suppose I've to use it in a script, how do I get it ?
I've written this small script to get the IP address :
/sbin/ifconfig | grep inet | sed -n 1p | tr -s " " |cut -f3 -d " "|cut -f2 -d ":"
Is there simpler way to do it ? Also ifconfig is unavailable for normal users, so the above script won't be useful for non-root users.
In any case your IP is masqueraded with some other ip so ifconfig wont help. So go to http://checkip.dyndns.org/, it will display your public ip. Now you may be able to access your machine from any where in the world.