Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

how do i find my PROPER ip address

  • 10-08-2007 9:22pm
    #1
    Registered Users, Registered Users 2 Posts: 1,985 ✭✭✭


    im trying to find out my proper ip address.

    when i go nto the network pref pane, it says ip address as 10.0.1.200, but i know this is the one given by the airport extreme as a local thingy...

    when i go to http://www.ip-adress.com/ it says my ip as it is really is. 89.100.x.x

    how do i find out my ip address using terminal??

    cheers
    moe


Comments

  • Moderators, Category Moderators, Arts Moderators, Entertainment Moderators, Technology & Internet Moderators Posts: 22,693 CMod ✭✭✭✭Sad Professor


    You mean your internet ip address? The one reported by ip-address.com would be correct. I'm don't think you can find that out via terminal. Your modem/router page will have it also. The 10.0.1.* is your computer ip.


  • Registered Users, Registered Users 2 Posts: 1,985 ✭✭✭big_moe


    ah right... clears that up so!!

    cheers prof


  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    #!/bin/sh
    
    URLS[0]="http://checkip.dyndns.org"
    URLS[1]="http://whatismyip.com"
    URLS[2]="http://www.whatismyipaddress.com"
    URLS[3]="http://ipid.shat.net"
    URLS[4]="http://www.edpsciences.com/htbin/ipaddress"
    URLS[5]="http://www.showmyip.com"
    
    for URL in ${URLS[@]}
    do
           THIS=${URL}
           IP=`curl -s "${THIS}" | tr -cs '[0-9\.]' '\012' \
                   | awk -F'.' 'NF==4 && $1>0 && $1<256 && $2<256 && $3<256 && $4<256 && !/\.\./' | uniq`
           if [ $? == 0 ]; then
                   IP=`echo $IP | awk '{print $1}'`
                   echo "your IP Address is: $IP"
                   exit
           fi
    done
    

    open up terminal and type these commands

    nano IP.sh
    >>copy and paste code above into nano. save by hitting control+X hit y to confirm filename<<
    chmod 777 IP.sh
    ./IP.sh

    it will output you external web ip address

    and from now on all you have to type is ./IP.sh


  • Registered Users, Registered Users 2 Posts: 6,163 ✭✭✭ZENER


    There are plenty of widgets that will do this too, just search the Apple widgets page at apple.ie.

    ZEN


  • Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭Rollo Tamasi


    They're are plenty of websites too, such as What is my IP?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    ZENER wrote:
    There are plenty of widgets that will do this too, just search the Apple widgets page at apple.ie.

    ZEN
    They're are plenty of websites too, such as What is my IP?

    yes, but he asked for a way find it using the Terminal.


  • Registered Users, Registered Users 2 Posts: 1,985 ✭✭✭big_moe


    i didnt know there were widgets to do it. i assumed i'd have to use terminal as on windows you have to use command prompt.

    cheers everyone


  • Closed Accounts Posts: 4,620 ✭✭✭Roen


    ifconfig -a | grep en0 (if wired) should do it for you, or you could just do an ifconfig and oggle what pops up.


  • Registered Users, Registered Users 2 Posts: 6,424 ✭✭✭440Hz


    yup i was gonna suggest ifconfig as well, nice one Roen, oh and welcome to the forum kind Sir, its about time too! :D


  • Registered Users, Registered Users 2 Posts: 3,514 ✭✭✭Rollo Tamasi


    Cremo wrote:
    yes, but he asked for a way find it using the Terminal.

    oh, didn't notice that.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    ahh it's grand i only mentioned it as i thought it might of been part of a bigger plan where you could pipe the output of the shell program into another.


Advertisement