Re: External IP address



slebetman@xxxxxxxxx wrote:
Uwe Klein wrote:
slebetman@xxxxxxxxx wrote:
chawki.jreige@xxxxxxxxx wrote:
How would I obtain the external IP address?

package require http
set f [http::geturl http://checkip.dyndns.com]
set raw [http::data $f]
http::cleanup $f
regexp -- {(\d+\.\d+\.\d+\.\d+)} $raw --> ip_address

puts $ip_address


my workplace, your script: 84.144.214.55

Which is exactly what the OP wanted.

Read carefully: the OP specified the "external" IP address which I
interpreted as the public IP, one attached to the NAT gateway.

It should be noted however that even this may not get you the
"external" ip in question (the one belonging to the NAT gateway, if
any) but will instead get you an ip given by your HTTP proxy --
definitely not what you wanted since it is useless (the ip of the NAT
gateway is at least useful when used with port forwarding).

My ISP decided to install a transparent proxy one day without telling
anyone about it. The unfortunate part is that the proxy apparently has
a bug (or is over-eager) and ignores the HTTP header returned by
checkip.dyndns.com telling it not to cache the packet. So when I
queried the page it returned a cached version which contains an ip
address that belongs to someone else who accessed the page earlier
(probably my neighbor). Fortunately checkip.dyndns.com supports
querying via an alternate port which should solve the problem. I just
can't remember what port it is.

.



Relevant Pages

  • Re: HTTPS Using Web Proxy
    ... The ISA log displays the following on the error. ... HTTP Method = ... I created a HTPPS 444 protocol set to TCP port 444 and assigned it to my ... At first I was getting a error code: 502 Proxy Error and fixed that by ...
    (microsoft.public.isa)
  • Re: Access SSH server via HTTP proxy
    ... I have learned that you can access ssh server via http proxy. ... So I wonder if I change my SSH server port to 8080 for example, ...
    (comp.security.ssh)
  • RE: ServicePointManager does not support proxies of HTTPS scheme
    ... I think the term proxy is what is adding some confusion. ... There is an HTTP ... proxy server somewhere in your environment that is saying it will not pass ... the browser typically switches to port 443. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Not able to allow skype
    ... week ago I saw in the monitoring that it's trying to go over port 33033. ... Sometimes you are able to sign in to skype but not to call. ... will have trouble then connecting from home with a proxy filled in. ... Can it be something to do with the webproxy filter which is on for http ...
    (microsoft.public.isa)
  • Re: SBS 2003 and Outlook RPC over HTTP issues
    ... , but some of my clients do not want users to ... definitely closed now cause when I open it up http: ... the article is incorrect in stating that port 80 is needed. ... that port 443 and port 80 must be open to use RPC over HTTP. ...
    (microsoft.public.windows.server.sbs)