Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    trying to get my external ip


    I am attempting to use a service like dyndns so that I can access my Debian (woody) box from the outside world. To do so, I need to find out what my external ip address is. I thought running


    would give me this info but all I can see is the static ip I have assigned it for my LAN,

    eth0 Link encap:Ethernet HWaddr 00:30:BD:71:8B:14
    inet addr: Bcast: Mask:
    RX packets:32127 errors:0 dropped:0 overruns:0 frame:0
    TX packets:21782 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:41490509 (39.5 MiB) TX bytes:8850771 (8.4 MiB)
    Interrupt:10 Base address:0x9000

    lo Link encap:Local Loopback
    inet addr: Mask:
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:1038 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1038 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:117728 (114.9 KiB) TX bytes:117728 (114.9 KiB)
    I have a cable internet connection that uses dhcp. The connection hooks directly to a router with an internal ip of, which I set as the gateway for my Debian box. Please let me know if more info is needed about my configuration.



  2. #2
    Linux Guru loft306's Avatar
    Join Date
    Oct 2003
    The DairyLand
    look in the routers setup for the public ip ! in that setup it is the router that holds the lease with your isp.
    ~Mike ~~~ Forum Rules
    Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Toronto, ON, Canada
    Here is your external IP.

    But one way to do it is using trace route to some external host and looking in the list returned by trace route for the first public IP. This work fine except for some ISPs working with public IPs in their internal network segment.


  4. $spacer_open
  5. #4
    thanks to both of you.

    Unfortunately all I am able to get is the IP of my router (which is what the little penguin told me).

    I may not have read through enough of dyndns's documentation, but I think there is a way to point a dyndns host directly to a specific machine...

    any thoughts?

  6. #5
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    You will have to point the dns to the router's IP, and then set the router to forard the port used to the specific computer;

    Registered Linux User #371543!
    Get force-get May The Source Be With You

  7. #6
    ok now it's making sense.

    My problem is that one machine on my network already has port 22 (ssh) forwarding to its internal, static ip (under a different dyndns host name). Does this mean that no other machines on the LAN can use this port?

  8. #7
    Just Joined!
    Join Date
    Jan 2005
    Toronto, ON, Canada
    As you can specify to the ssh client the port number

    sshclient [-r] [-p port] [-u user] [-h host] [profile.ssh2]

    You can dedicate arbitary port on the external IP to be forewarded to your internal host at port 22. The only thing is when you connect you have to do it to the external host and have to specify the external port number.


  9. #8
    now i'm confused again

    do you mean something like

    $ssh -p 55

    Tried this w/port 55 forwarded to 22 and my machine's ip and the connection was refused

  10. #9
    my bad. I was forwarding the port incorrectly within the router. fixed it and same line now works.

    Thanks for all the help

  11. #10
    Just Joined!
    Join Date
    Jan 2005
    Toronto, ON, Canada
    I do not know if is used port 55 for anything else but using some port like 55555 will be safe and may be some day a well known port of



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts