Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
greetings, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Posts
    39

    trying to get my external ip


    greetings,

    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

    #ifconfig

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

    eth0 Link encap:Ethernet HWaddr 00:30:BD:71:8B:14
    inet addr:192.168.1.161 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    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:127.0.0.1 Mask:255.0.0.0
    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 192.168.1.1, which I set as the gateway for my Debian box. Please let me know if more info is needed about my configuration.

    Thanks,

    -dave

  2. #2
    Linux Guru loft306's Avatar
    Join Date
    Oct 2003
    Location
    The DairyLand
    Posts
    1,666
    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
    http://loft306.org

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Location
    Toronto, ON, Canada
    Posts
    79
    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.


    afrolinux

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Nov 2004
    Posts
    39
    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
    Location
    Cymru
    Posts
    4,157
    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;

    dylunio
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  7. #6
    Just Joined!
    Join Date
    Nov 2004
    Posts
    39
    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
    Location
    Toronto, ON, Canada
    Posts
    79
    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.

    afrolinux

  9. #8
    Just Joined!
    Join Date
    Nov 2004
    Posts
    39
    now i'm confused again

    do you mean something like

    $ssh -p 55 me@myhost.dyndns.com


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

  10. #9
    Just Joined!
    Join Date
    Nov 2004
    Posts
    39
    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
    Location
    Toronto, ON, Canada
    Posts
    79
    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 you@myhost.dyndns.com.

    Regards,

    afrolinux

Page 1 of 2 1 2 LastLast

Posting Permissions

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