Question(s): socket.RemoteEndPoint
-
Thursday, May 17, 2012 2:35 AM
Lets say that i setup a client + server that only contains the socket systems.
[*]Client starts up and connects to the server Ip(xx.xx.xx.1) port 9989
[*]Server accepts the connection
[*]and then i get the client ip address... Client.Socket.RemoteEndPoint.ToString().Split(':')[0]);
[*]The socket remains connected
Note: whenever i restart my router my ip address changes its not a static one
Question(s):
[*]Is there any way to fake my ip address before i connect or give the server a false ip when it requests the RemoteEndPoint?[*]Now if i have a single client connected to the server and i wanna change my ip while i'm still connected to the server i have to restart the router and by doing so i'm going to get disconnected due to the network loss now is there any way to change my ip (without getting disconnected) so when i connect to the server with a second client it sees a different ip address ?
The idea is to eliminate any 3rd party's or any potential black hats that wold fake the client connecting process. and kill the server by connecting more then the maximum allowed clients per ip address which is 2 clients. now i had ppl connecting more the 200 clients at once and that's not good at all.
I'm looking at it this way... if there is no way to fake the machine ip address or whatever ip that the Socket.RemoteEndPoint gets... i can monitor the ip addresses that are connecting to the server and kill the extra ones..
Thanks in advance.
All Replies
-
Thursday, May 17, 2012 6:01 AM
[*]Is there any way to fake my ip address before i connect or give the server a false ip when it requests the RemoteEndPoint?
It depends. Traditionally it was yes, but all modren switches / boardband routers that aren't cheap have some level of anti-"IP address spoofing" capabilites added now. So it depends on what networking equipment you have.
[*]Now if i have a single client connected to the server and i wanna change my ip while i'm still connected to the server i have to restart the router and by doing so i'm going to get disconnected due to the network loss now is there any way to change my ip (without getting disconnected) so when i connect to the server with a second client it sees a different ip address ?
Your old connection to that server will linger until the timeout expired (usually 30 seconds). Your application's new request will fail unless it re-establish the connection. So when you limit the connection per ip address to 2, if the application use only 1 the application can reconnect, if the application use 2 the application will have to wait until the old connection expire until they can reconnect.
- Edited by cheong00 Thursday, May 17, 2012 6:02 AM

