Adam Law
Adam Law

Reputation: 542

Method or application to simulate a connection coming from the internet using 2 PCs on the same LAN

I have Java applications I need to test. One a server, and another a client, both on separate machines on the same LAN, that shares the same internet connection. I need to simulate a connection request as if it came through the internet. I try the usual method of specifying the WAN IP, and server port, but it fails. It might be that I am doing it wrong, or it is just not possible w/o help. If it's the former, I'd appreciate being taught the correct way, if it's the latter, I need to know what these methods or applications are.

Upvotes: 0

Views: 191

Answers (2)

Jason
Jason

Reputation: 11832

Depending on your network configuration, you may not be able to access the WAN IP from inside the network. If this is the case and you need to test using the WAN IP, try a VPN on your client machine that provides a virtual endpoint out on the internet.

Upvotes: 1

Burrito
Burrito

Reputation: 515

By the sounds of it you are trying to simulate a test of a client/server application. To test this on a LAN you should connect to the local IP address of the server from the client application. This will ensure that you do not need to forward any traffic from the firewall or router into the LAN.

Update the firewall on the server machine to ensure that you can make a connection to it from the client using telnet if this connects then you are almost complete.

If you want to test connecting to the WAN ip address then you will need to set up the port forwarding so that the router/firewall/whatever will know where to send the data when it receives that connection.

Upvotes: 1

Related Questions