Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-18-2007, 02:40 AM   #1
LQ Newbie
Registered: May 2007
Location: Italy
Distribution: Debian
Posts: 4

Rep: Reputation: 0
Question How do I get the gateway IP from a DHCP client machine?

Hi every1, I got the following problem:

I made a small linux box which needs to be placed somewhere around the world, connected to the internet via DHCP (that is, eth0 interface has dhcp turned on).
I then need to "SSH" the box.
How do I get the machine to "know" the public address bound to it?

I know, netstat gives the statistic about IPs, but only about the LAN IP, somewhat like 192.168.1.* , instead I need the gateway IP or anyway, the IP I must SSH from my server machine.

Is there a command to get it? Or what?
Old 05-18-2007, 03:56 AM   #2
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 32
how about using a service such as or


client, dhcp

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP client not assigning gateway address zegenie Linux - Networking 3 11-30-2006 04:32 PM
DHCP client not assigning gateway address zegenie SUSE / openSUSE 1 11-29-2006 06:45 AM
dhcp client .. not setting gateway and dns server scabrous1 Linux - Networking 1 05-09-2006 10:31 AM
Configuration DHCP and Gateway on linux machine zowey Linux - Networking 4 04-03-2004 02:17 PM
*** REVERSE DHCP - Linux assumes ip according client gateway request *** domingo-br Linux - Networking 0 07-01-2003 07:53 PM

All times are GMT -5. The time now is 06:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration