Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: jumba on January 25, 2008, 11:47:23 PM

Title: Finding the external gateway on dhcp
Post by: jumba on January 25, 2008, 11:47:23 PM
Sorry for my stupidity, but I've searched the net for almost an hour, so now I throw out the question at you guys:

I need to find out the external gateway address which has been assigned by the ISP to my WAN nic in the Smeserver.

Just what command should I run in order to find that out???

Thanks!
Title: Re: Finding the external gateway on dhcp
Post by: Confucius on January 25, 2008, 11:55:32 PM
Well.... I have a modem between my NIC & Provider that's not bridged but that shows up very nicely when I do "route". Don't know for sure if that's what you mean.
Title: Re: Finding the external gateway on dhcp
Post by: jumba on January 25, 2008, 11:59:09 PM
Yes of course, - stupid me :sad: :sad: :sad: :sad:

"route" was the very simple answer.

Many thanks!!!!!
Title: Re: Finding the external gateway on dhcp
Post by: beakersloco on January 26, 2008, 01:18:48 AM
Try looking on your server manager >> Review Configuration and look at the External IP Address.

You could also install
http://wiki.contribs.org/Phpsysinfo

or better yet
do a google search for show my ip.
http://www.mediacollege.com/internet/utilities/show-ip.shtml

Hope this helps I also have had that question before but did not know how to look it up on the server.
Title: Re: Finding the external gateway on dhcp
Post by: cactus on January 26, 2008, 04:48:04 PM
but did not know how to look it up on the server.
Or as root on th SME Server shell:
Code: [Select]
db configuration show ExternalIP and perhaps even
Code: [Select]
ifconfig should give you the IP number.
Title: Re: Finding the external gateway on dhcp
Post by: jumba on January 26, 2008, 05:13:16 PM
Thank you all, but "route" was really the correct answer.

I needed to find out which EXTERNAL GATEWAY I had been assigned from my ISP (Normally the ISP's first router), - not the IP of my external (wan) interface.

Title: Re: Finding the external gateway on dhcp
Post by: cactus on January 26, 2008, 05:16:14 PM
I needed to find out which EXTERNAL GATEWAY I had been assigned from my ISP (Normally the ISP's first router), - not the IP of my external (wan) interface.
You did sort of :-D:
I need to find out the external gateway address which has been assigned by the ISP to my WAN nic in the Smeserver.
Since you asked for IP number assigned to the WAN interface in your SME Server and that is exatctly what my command gives :-)
Title: Re: Finding the external gateway on dhcp
Post by: jumba on January 26, 2008, 05:20:12 PM
Sorry, that was due to some poor English I think.

The situation was that I needed to configure an ipsec tunnel on a machine connected by ADSL/DHCP.

One of the needed parameters here is the address of the GW, which I assume would be what I could find out by using the "route" command.
Title: Re: Finding the external gateway on dhcp
Post by: ere on July 11, 2010, 04:31:25 PM
Sorry for my stupidity, but I've searched the net for almost an hour, so now I throw out the question at you guys:

I need to find out the external gateway address which has been assigned by the ISP to my WAN nic in the Smeserver.

Just what command should I run in order to find that out???

Thanks!
what are you looking for showing you ip ? or gateway?

the gateway is mostly the address of your router, and can be seen from windows cmd by running ipconfig /all
if you need you external ip then just visit  http://www.showmyip.me (http://www.showmyip.me)
Title: Re: Finding the external gateway on dhcp
Post by: larieu on July 11, 2010, 04:57:42 PM
you can see it also by mtr (in linux) or you just use winMTR (for windows)
also you can use traceroute (tracert - in windows)

in this way you can catch all "gateways" on the way - it is very helpfull when you want to cathc the gateway of your NAT router

for example
you have something like network computers <-> NAT ADSL router <-> Internet
and you'll need the gw of that router

mtr/traceroute will give you something like

IP on LAN side of router (gateway for your computers on network) with several packet statistics
IP of the gateway of your router (with the same statistic)
IP of the gateway of your gateway route....