   Everything getting routed to one PC in my network...
  FYI, I'm using RakNet for all this.I have 2 PC's on my local network. My dev PC and my wife's PC. I've created a logon server program. It listens on port 1234. I have a wireless linksys router. My PC is hardwired to it, my wife's is wireless. In my programs I'm using a no-ip address for the ip address to connect to. In my routers configuration webpage I have port 1234 forwarded to my wife's local ip (192.168.1.100).When I run the logon server program on my PC, I am able to connect to it from the client program ran on my PC.I wish to run the logon server program on my wife's PC. It starts up just fine, but when I run the client from my PC and try to log in it never goes to my wife's PC.I downloaded a packet sniffer program and it confirms that when I try to logon the packets are trying to go to 192.168.101 all the time, which is my dev PC. So it's like anything coming from the outside internet on port 1234 is being routed to my PC instead of my wife's even though I configured the router to forward stuff coming in from port 1234 to her PC.If I remove the no-ip address and tell it to connect to my wife's PC it works.So what's the deal there? Why would my router always send those packets to my PC even though I specifically told it to send the packets to my wife's PC when stuff comes in on port 1234?   
Quote:Original post by rpillerSo it's like anything coming from the outside internet on port 1234 is being routed to my PC instead of my wife's even though I configured the router to forward stuff coming in from port 1234 to her PC.Is the configuration correctly set for UDP? Routers tend to allow different settings for different protocols.And is it really anything? What if you try to set up a different server, HTTP or something. What if you connect from outside? What if you set DMZ to .101 machine?What if you switch the IPs? So that server is on 100.Quote:So what's the deal there? Why would my router always send those packets to my PC even though I specifically told it to send the packets to my wife's PC when stuff comes in on port 1234?If router is the problem, then the easiest solution is to use local DNS (hosts. file). Put the entry for your DNS and map it directly to .101 address. If problem is in router really incorrectly routing outside traffic (not hairpin connections from LAN), then I don't know. Double-check the settings, try DMZ perhaps.   ;  In general, a router will do NAT translation between the outside (the "modem" port) and the inside (the wireless network and the wired hub ports).I think you'd be much better off keeping your PC and your wife's machine both in the 192.168.x.y subnet, and not use any port forwarding or DMZ settings. If you do that, then any port on your wife's machine will be visible to your machine, and vice versa (modulo any local firewalls on the machines).When trying to connect between the machines on the inside network, just use the appropriate 192.168.x.y address.   ;  But if I'm using no-ip, I see it going out to their site to get my ip address, then coming back. So if I want to have a server on my wife's machine and a client on my machine I have to use the local ip address of the server instead of an external address? That kind of sucks.I haven't tested someone outside my network yet, but if they use the no-ip address should that work no matter what PC on my network is running the server?[Edited by - rpiller on May 5, 2009 10:47:46 PM];Quote:Original post by rpillerBut if I'm using no-ip, I see it going out to their site to get my ip address, then coming back.The DNS query to no-ip (I had to google that to find out it was a dynamic DNS-style provider) will go outside via your router to no-ip. no-ip will come back and say "mydnsname.com corresponds to IP address 1.2.3.4" and then your server will try to connect to IP address 1.2.3.4. The router will not translate the address 1.2.3.4 in an "inside" port.Quote:Original post by rpillerSo if I want to have a server on my wife's machine and a client on my machine I have to use the local ip address of the server instead of an external address? That kind of sucks.Pretty much that's right. The simple way to resolve this is to change your local DNS settings (i.e. edit the hosts file) so that your no-ip DNS name resolves to your wife's internal IP address.   ;  OK, thanks for the info. That's the best explanation I've received on this so far. I'll try changing the host file.   ;  Basically Codeka gave the answer, but it lacks substance. (Why that things are the way they are...)Your setup is like this (assumed):  You have two computers in your LAN.  A: 192.168.1.100 via WLAN (whife)  B: 192.168.1.101 via wired Ethernet (dev)  You have a router that has the gateway address of 192.168.1.1 (or 254) and a public address of what ever your ISP gave it. Lets assume the public address is 81.116.23.45.The computer A is configured to use a dynamic dns service (no-ip). There are multiple ways how this works, but chances are that it resolves to the public address, the address of the router. Alternatively it resolves the local address and is rejected by the dyn-dns provider. The later case it will never work. The the prior case it does not make a difference if the dyn-dns tool is run on one network host or the router. (Many provide this feature.)You are trying to communicate from computer B to A. To do this you resolve to the external address via no-ip (81.116.23.45). The router now gets a request coming from the 192.168.1.* network for it on the wrong port. Chances are that the request is rejected since it is not on the proper port.Since you are saying that you traced the calls coming to the wrong computer, there is a chance that the packets are not rejected but simply not properly NATed since you are trying something that is not intended by IP. (You computer might be the DMZ computer?)With IP it is intended to use the shortest path possible. If two computers are in one network they can (and should) talk to each other directly. On if two computers are in different networks routing is actually performed. To solve your problem you can either use DNS or a hosts entry. Alternatively if your IPs are hard coded you can actually use the actual IP address.   