How do I find my IP address



This is one that can be handy from time to time, trying to find your ip address. If you’re on a lan there aren’t too many ways to find your public ip within the operating systems software. However, under Windows if you go to, Start, Run and then type cmd and press enter you’ll get a command prompt from which you can type ipconfig and see the ip address for each network interface. One is the loopback interface and should read 127.0.0.1

Under Linux the same list can be acheived by running /sbin/ifconfig from the command prompt. It should give roughly the same set of information on each network interface. But these won’t tell you your public IP address unless you’re directly connected to the internet. How do you find that if you’re behind a firewall or within a LAN? There are several web pages which can help. One, I’ve put up here at averyjparker.com My IP check page

I’ve made it plain text so that it’s easy for a script to parse the contents. It tells, the public IP address, User agent (web browser), and your LAN IP address if there is one. There are also other sites, like whatsmyipaddress.com and others that a google search might reveal.

The page I use is basically php and very simple…

If you’re interested in the code I’ve included it below.





< ?php

$IP=$_SERVER['REMOTE_ADDR'];
$USERAGENT=$_SERVER['HTTP_USER_AGENT'];
$FORWARDEDFOR=$_SERVER['HTTP_X_FORWARDED_FOR'];

?>

Your public ip address is
< ?php echo $IP ?>
Your browser is
< ?php echo $USERAGENT ?>
If you’re behind a firewall, this may be your internal IP address (LAN, not public)
< ?php echo $FORWARDEDFOR ?>


Related Posts

Blog Traffic Exchange Related Posts
  • A tun of trouble.... Sorry, VERY bad pun but I couldn't resist. I mentioned that I was having tun difficulties that kept me from playing around with anything fancy networking-wise with qemu. For starters let me see if I can explain what tun is. Tun is a method of creating a point-to-point "imaginary" network......
  • Evolution email error MAIL FROM command failed: Unknown Some time back, I was teetering on the brink.... I've used Evolution as my linux mail client for ages (since I switched), because it had the calender integrated etc... However, Kontact has REALLY looked nice for some time, but I didn't have time to mess with changing. Then one day,......
  • The end for Windows 98 may be a boost to linux? There are articles out about the demise of official Windows 98 and ME support would be a boost to linux uptake. Realistically, I suppose it may, but I personally am not holding my breath. Here's why. 1) The people still running Windows 98/ME are likely doing so because that's what......
Blog Traffic Exchange Related Websites
  • Panasonic Security Camera Review - BB-HCM531A For your home or office, security is one of the biggest concern and we all think more about securing valuable things. It is not always required for you to sit and do the security job. With the invent of digital technology, there are various feature rich cameras which could do......
  • Apple claims Safari 4 to be the Fastest Browser Safari 4 is World's fastest browser: Apple When compared to other browsers, Apple boasts that Safari 4’s JavaScript is up to eight times faster than IE 8 and more than four times faster than Firefox 3; and Safari 4 loads HTML web pages more than three times faster than IE......
  • Find the physical location of an IP address There are lots of ways to do this, but I have a couple of favorite sites that show you the location and other details about an IP address. Geobytes gives you location information including latitude and longitude, time zone from GMT, country, region, city and a Google map of the......
www.pdf24.org    Send article as PDF   

Similar Posts


See what happened this day in history from either BBC Wikipedia
Search:
Keywords:
Amazon Logo

Comments are closed.


Switch to our mobile site