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.
|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 PostsRelated 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......
- What a week.... I think it's time to pass along a long story of what's gone on over the last week or so here and some of the reasons there hasn't been anything posted. Generally, I would say that work has been busy, but something happened last week that went a bit beyond......
- Network administration over the holidays Nobody wants to be tied to their job over the holidays, but what if someone has hacked your servers and is using your machine to scam thousands of people a day? Does that keep for two weeks? Does someone monitor the abuse address? Incidents.org has a post on messages they've......
- Using MySQL In A Hosting Environment MySQL is a heavy-duty database server. Used with various software languages, most notably PHP, and part of the LAMP family (which is comprised of Linux, Apache, MySQL, and PHP), Whether it's a customer relations management list or medical records, any data you have that needs storing, is stored on a......
- Make Free Phone Calls Anywhere in the USA with Google Voice, Gizmo, and Asterisk Update: The instructions here are no longer valid, because Google has since closed off inbound SIP calls into Google Voice. However, I have posted a new solution for making free phone calls with Google Voice, Gizmo, and Asterisk. I recently switched my GrandCentral account over to Google Voice. I fooled......
- 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......
- Backing up and restoring MySQL databases
- Using the command line in linux – part 1
- Using DNS servers other than your ISP’s
- Mozilla Firefox user-agent spoofing
- Ping not working? try ARP