Hi! it seems that my ISP ( LAN based internet ) has blocked pinging of internet hosts. I am unable to ping google,yahoo etc.
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.
Please guide,
Mayuesh is facing some problems posting to the list so I m posting on his behalf <text> We plan to organise a Linux Mumbai event. The objective of the event is: 1. Act as a boost to the Linux and Open Source movement in Mumbai. 2. Spreading Linux awareness amongst commercial entities in Mumbai. 3. To foster technical growth in Mumbai. 4. To act as a platform for commercial entities to showcase their products.
We would like to initiate an open discussion about the same and would like to know the views of the listas.
Warm Regards,
~Mayuresh </text>
----- Original Message ----- From: "Nikhil Joshi" nikhil_joshi@gmx.net To: linuxers@mm.ilug-bom.org.in Sent: Monday, December 08, 2003 7:22 PM Subject: [ILUG-BOM] Cannot ping internet hosts
On Monday 08 December 2003 19:01, Harsh R Busa wrote:
Mayuesh is facing some problems posting to the list so I m posting on his behalf
<text> We plan to organise a Linux Mumbai event.
Is it a commercial or not for profit venture.
The objective of the event is:
- Act as a boost to the Linux and Open Source movement in Mumbai.
- Spreading Linux awareness amongst commercial entities in Mumbai.
- To foster technical growth in Mumbai.
- To act as a platform for commercial entities to showcase their products.
We would like to initiate an open discussion about the same and would like to know the views of the listas.
Warm Regards,
~Mayuresh
</text>
----- Original Message ----- From: "Nikhil Joshi" nikhil_joshi@gmx.net To: linuxers@mm.ilug-bom.org.in Sent: Monday, December 08, 2003 7:22 PM Subject: [ILUG-BOM] Cannot ping internet hosts
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.
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.
alas, behind NAT :-(
BTW your solution gave me an idea to check if i am connected :
if wget -q -O /tmp/index checkip.dyndns.org then echo "Connected :-) " else echo "Not connected :-( "
Regards, Nikhil