| re: How to obtain the public IP address of a machine outside the firewall
Ed:
I have been able to do it with:
Request.ServerVariables.Item("REMOTE_HOST")
In web applications that I have written.
Hope that helps!
Fred
"Ed Willis" <ed_willis@acsi.orgnospam> wrote in message
news:eZAmKqtqDHA.2644@TK2MSFTNGP09.phx.gbl...[color=blue]
> We have several offices that have a DSL or Cable modem where the IP[/color]
address[color=blue]
> is dynamic and changes often. I created a VB app that obtains the IP[/color]
address[color=blue]
> but it obtains the IP address within the firewall and we need the public[/color]
IP[color=blue]
> address of the machine outside the firewall so we can use Remote Desktop
> connection for problem resolution etc.
>
> Here is my current code:
> Dim myWorkstation As String = System.Net.Dns.GetHostName()
>
> Dim IPAdress As String =
> System.Net.Dns.Resolve(myWorkstation).AddressList( 0).ToString
>
> Dim MachineName As String = Environment.MachineName
>
> How can I obtain the other IP address?
>
> Thanks.
>
>
>
>
>
>[/color] |