Ip Address
Ip Address
Ip Address
Ip Address
Ip Address
Ip Address Ip Address Ip Address Ip Address Ip Address Ip Address Ip Address Ip Address
Ip Address Ip Address
Ip Address
Go Back  Xtreme Visual Basic Talk > > > Ip Address


Reply
 
Thread Tools Display Modes
  #1  
Old 11-07-2003, 09:57 AM
deathman5's Avatar
deathman5 deathman5 is offline
Junior Contributor
 
Join Date: Jul 2003
Posts: 396
Unhappy Ip Address


I click ipconfig and I got my IP
then I went to http://www.danasoft.com/ and my IP there was tottaly different!
(I didnt disconnect then reconnect or anything)
now what I want is a way to get the true IP Address (remote IP address not Lan think its called Wan right?)
in vb?
thx
__________________
Keyboard Not Found
Press Any Key To Continue...
Reply With Quote
  #2  
Old 11-07-2003, 10:17 AM
mertlock mertlock is offline
Freshman
 
Join Date: Aug 2003
Location: Los Angeles, CA
Posts: 41
Default

You are behind a router.
Reply With Quote
  #3  
Old 11-07-2003, 10:42 AM
deathman5's Avatar
deathman5 deathman5 is offline
Junior Contributor
 
Join Date: Jul 2003
Posts: 396
Default

so anybody know a way to get the true IP add in VB?
__________________
Keyboard Not Found
Press Any Key To Continue...
Reply With Quote
  #4  
Old 11-07-2003, 10:55 AM
00100b's Avatar
00100bIp Address 00100b is offline
Martian In Disguise

Retired Moderator
* Guru *
 
Join Date: May 2003
Location: Minneapolis, MN
Posts: 9,566
Default

A simple way to get your own Local IP, add the Microsoft Winsock Control to your project and place an instance on a form. Then evaluate it's LocalIP property.
Code:
Private Sub Command1_Click() Debug.Print Me.Winsock1.LocalIP End Sub
__________________
The only stupid question is the one that goes un-asked.
Reply With Quote
  #5  
Old 11-07-2003, 11:01 AM
Illusionist's Avatar
Illusionist Illusionist is offline
Senior Contributor
 
Join Date: Oct 2003
Location: Chattanooga, TN USA
Posts: 1,069
Default

another way to do it, is go to Start > Run and type winipcfg.
It will bring up a window with all your IP info
Reply With Quote
  #6  
Old 11-08-2003, 09:59 AM
deathman5's Avatar
deathman5 deathman5 is offline
Junior Contributor
 
Join Date: Jul 2003
Posts: 396
Default

I just want to know is my true IP address the one that I see when I click
ipconfig or http://www.danasoft.com/ ?
I never get them the same...
__________________
Keyboard Not Found
Press Any Key To Continue...
Reply With Quote
  #7  
Old 11-08-2003, 10:27 AM
Illusionist's Avatar
Illusionist Illusionist is offline
Senior Contributor
 
Join Date: Oct 2003
Location: Chattanooga, TN USA
Posts: 1,069
Default

the one at danasoft, is your IP address used to connect to the internet. The one you see from ipconfid, or winipcfg is your intranet IP address.
Reply With Quote
  #8  
Old 11-08-2003, 10:45 AM
deathman5's Avatar
deathman5 deathman5 is offline
Junior Contributor
 
Join Date: Jul 2003
Posts: 396
Default

Quote:
Originally Posted by Illusionist
the one at danasoft, is your IP address used to connect to the internet. The one you see from ipconfid, or winipcfg is your intranet IP address.




I point is I want to make a program to connect with another person (winsock)
Code:
Winsock.LocalPort = PORT Winsock.Listen '------------------ Winsock.RemoteHost = !!!THIS!!! Winsock.RemotePort = PORT Winsock.Connect

the Ip address that should I write to connect to the first program is the one I see in ipconfig or the website?
that what I want...
__________________
Keyboard Not Found
Press Any Key To Continue...
Reply With Quote
  #9  
Old 11-08-2003, 11:08 AM
Heathcliffer Heathcliffer is offline
Regular
 
Join Date: Nov 2003
Posts: 70
Default

Quote:
Originally Posted by deathman5
Quote:
Originally Posted by Illusionist
the one at danasoft, is your IP address used to connect to the internet. The one you see from ipconfid, or winipcfg is your intranet IP address.




I point is I want to make a program to connect with another person (winsock)
Code:
Winsock.LocalPort = PORT Winsock.Listen '------------------ Winsock.RemoteHost = !!!THIS!!! Winsock.RemotePort = PORT Winsock.Connect

the Ip address that should I write to connect to the first program is the one I see in ipconfig or the website?
that what I want...


try both the server and the client on your PC, and connect to the internet, type both of them (one at a time ) and connect, see which one will connect !!! with me I tried the ,IPConfig and it worked fine !! but I want to ask , why I can't give my IP address to someone if it is every connection changes !??????
hope this will do the work for you !
Reply With Quote
  #10  
Old 11-08-2003, 11:18 AM
deathman5's Avatar
deathman5 deathman5 is offline
Junior Contributor
 
Join Date: Jul 2003
Posts: 396
Default

thats so stupid from me :P I should've thought of trying...
the ipconfig is the correct one.
thx anyway
__________________
Keyboard Not Found
Press Any Key To Continue...
Reply With Quote
  #11  
Old 11-08-2003, 11:40 AM
Illusionist's Avatar
Illusionist Illusionist is offline
Senior Contributor
 
Join Date: Oct 2003
Location: Chattanooga, TN USA
Posts: 1,069
Default

Actually, testing it on yourself or even in your local intranet will not give you the correct result. trying it on yourself using your local IP address, well duh your going to connect to your self. Try it again and type 127.0.0.1. That will also connect to you. You need to give you client to a friend and tell him to try and connect to you usign your local Ip address... It wont happen. He would have to connect using your internet IP address. Try it and see if it works.
Reply With Quote
  #12  
Old 11-10-2003, 04:15 PM
mertlock mertlock is offline
Freshman
 
Join Date: Aug 2003
Location: Los Angeles, CA
Posts: 41
Cool

If you are the winsock server and you want them to connect to you, and because it sounds like you are behind a firewall/router, you will need to give them the routers external ip address and then on the router/firewall you will neet to forward requests for your port to your internal ip address. Example incoming request on port 2001 to ip 24.205.184.13 forwarded to 192.168.0.2 on port 2001. Hope this helps, but it seems like more is involved here than just VB.
Reply With Quote
  #13  
Old 11-11-2003, 11:35 PM
Scott's Avatar
Scott Scott is offline
Centurion
 
Join Date: Jul 2002
Location: North Vancouver, Canada
Posts: 131
Default

Im behind a router aswell and the ipconfig address is the only one you need. The one from the website is your routers address and not the one that your router gives to you. So if you want to have another computer connect to you, you have to use the one you get from ipconfig. And you dont need to redirect anything from your router.
Reply With Quote
  #14  
Old 11-12-2003, 08:35 AM
Illusionist's Avatar
Illusionist Illusionist is offline
Senior Contributor
 
Join Date: Oct 2003
Location: Chattanooga, TN USA
Posts: 1,069
Default

Yes, you do have to have the router redirect to your intranet IP. You have to config your router's DMZ to bypass the firewall and redirect to your IP. Look in the manual that came with your router for more information. You can also try a google search for router and DMZ and see waht comes up.
Reply With Quote
  #15  
Old 11-19-2003, 09:58 AM
flynn flynn is offline
Centurion
 
Join Date: Oct 2002
Posts: 121
Default

Quote:
Originally Posted by Illusionist
Yes, you do have to have the router redirect to your intranet IP. You have to config your router's DMZ to bypass the firewall and redirect to your IP. Look in the manual that came with your router for more information. You can also try a google search for router and DMZ and see waht comes up.



Can anyone verify that this is correct? I'm not sure if it is. The reason I say this is that when I downloaded MS Messenger and installed it, nobody modified the router tables to direct MSN traffic to my computer, but yet I get messages all the time. Does anyone know how MSN is able to send traffic through a firewall successfully? I am trying to get my chat program to do this exact same thing, but don't fully understand how to get packets through a DMZ to my system.
Reply With Quote
  #16  
Old 11-19-2003, 03:59 PM
jumentous's Avatar
jumentous jumentous is offline
Contributor
 
Join Date: Sep 2003
Location: Australia
Posts: 612
Default

MSN connects to a server outside of your network and the address doesn't change, it is no different to you requesting a webpage, your problem is that you want someone to connect to you and your address is a local address probably 192.168.0.x which almost all networks use.

The only way to set this up is to do port forwarding on your router or else you must connect to someone else outside of your network.This is basically the defenition of a hardware firewall, do some reading on firewalls, your problem is not with vb
__________________
"In The Land of The Blind the One-Eyed Man is King."

Jumentous
Reply With Quote
  #17  
Old 11-19-2003, 06:35 PM
Larin Larin is offline
Newcomer
 
Join Date: Nov 2003
Posts: 25
Default

You gotta find your eternal ip and configure your DMZ so that all calls on a specific post are routed to your local ip.. It shouldn't be to hard to do.
Reply With Quote
  #18  
Old 11-19-2003, 06:49 PM
Illusionist's Avatar
Illusionist Illusionist is offline
Senior Contributor
 
Join Date: Oct 2003
Location: Chattanooga, TN USA
Posts: 1,069
Default

Thank you guys for backing me up! See, i do knwo what I'm talking about sometimes!

Your best bet on configuring your DMZ would either be to look in the manual that came with your router, or look on google for intructions on how to.
Reply With Quote
  #19  
Old 11-20-2003, 08:52 AM
flynn flynn is offline
Centurion
 
Join Date: Oct 2002
Posts: 121
Default

Quote:
Originally Posted by jumentous
MSN connects to a server outside of your network and the address doesn't change, it is no different to you requesting a webpage, your problem is that you want someone to connect to you and your address is a local address probably 192.168.0.x which almost all networks use.



But if my company's gateway IP is static and my work machine IP is static, shouldn't a server program (written by me) be able to connect from my home machine, through the company gateway and then on to my work machine? After all, my server sending data is no different than msn's server sending data to my work machine. And nobody changed any tables to allow MSN to talk to my machine. So, I shouldn't have to change anything to allow my server program to talk to my work machine.

Sorry for being so dense on this subject, but this is something I have been struggling with for months. I just don't quite see the difference between MSN and my server program. Both servers are talking to static IP's.

Another scenario that seems to contradict this is that when I request a web page (at home), the web server "knows" to send the page to my ISP and then on to me. Does the ISP change any routing tables to allow web data to come to me? Does the ISP's system create a port that I am connected to (during that particular session) and send that port number on to the web server which sends my requested data back to the ISP, which then sees that data came in on the port assigned to me and sends my requested data on to my computer?

Quote:
Originally Posted by jumentous
The only way to set this up is to do port forwarding on your router or else you must connect to someone else outside of your network.This is basically the defenition of a hardware firewall, do some reading on firewalls, your problem is not with vb


Again, if my IP's are static, why would there need to be a 3rd system involved? I know my work gateway IP, my work computer IP and my home computer IP.



Thanks for your patience as I really need to understand this.

flynn
Reply With Quote
  #20  
Old 11-20-2003, 09:07 AM
JordanChrisIp Address JordanChris is offline
Senior Contributor

* Expert *
 
Join Date: Jan 2003
Location: Newbury, UK
Posts: 1,092
Default

You may also have a Proxy server and a NAT (Network Address Translator) and a firewall in the loop as well....
All of these will help to prevent you making a connection from your home PC out through your ISP (and its Proxy/NAT/firewall) and across the Internet network and then in through your companies Proxy/NAT/firewall.

An HTTP Request from your web browser goes out through the firewall and the NAT gives it a return address. This request hits a web server that creates an HTML page that is then sent back to the address added by the NAT. The NAT knows that this return page is meant for you, and so directs it on back to your web browser.

This return to a request you sent is totally different to a random PC somewhere out there trying to send a request using a particular protocol (most of which are blocked at the firewall) to a particular port (most of which are blocked at the firewall) to a particular address (where the NAT doesn't know who to send it onto.

If your IPCONFIG address starts 192.*.*.* or 10.*.*.* then there is [very close to] no way to get a random request into your PC at work.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inside the executable: A visual basic developer's guide to the portable executable Merrion Tutors' Corner 2 05-13-2003 02:27 AM
EMAIL ADDRESS FORMAT for Exchange Global Address Book Adresses ohmyigod Communications 5 05-02-2003 09:34 AM
Global Address List florida Web Programming 2 01-21-2003 04:16 AM
Using IP Address Control !! Sabby API 2 07-09-2002 03:47 PM
C/C++ Collection Classes Visual Developer Miscellaneous Languages 3 06-09-2002 01:05 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Ip Address
Ip Address
Ip Address Ip Address
Ip Address
Ip Address
Ip Address Ip Address Ip Address Ip Address Ip Address Ip Address Ip Address
Ip Address
Ip Address
 
Ip Address
Ip Address
 
-->