2
1
I wrote a chat client and server in Java. It works but as I'm finding out, only locally. The goal is to get it to function over the web.
I've tried quite a lot of things, and can elaborate if need be. Completely new to this, so figure I'm suffering from a lot from "Don't know what I don't know" here."
This is what I've done so far:
- Enabled port-forwarding on my router.
- Ensured a static local IP address.
- Added the service on my network, with the proper port.
- Added an inbound rule that allows it through windows firewall, and though I'm not sure it was necessary, to cover my bases, I also added an outbound rule to match.
- Utilized http://www.canyouseeme.org/ to make sure that my service is reachable.
There was a similar question to this on SO, but it's for a web server and deals with javascript.
In your client, you put a ip to connect to ? I know less java, or it need a webpage to start the java plugin ? I ask in case it need a web server on the server too open – yagmoth555 – 2015-08-31T23:52:47.597
Yes, I put the IPv6 of my router, that is set up to port forward it to another computer that I'm using as a server.
When I used it locally I used the IP of the server computer directly, which didn't work over the net.
I'm not sure if the fact it's in Java even matters, but added it just in case. It doesn't use web start. The client is an executable. – None – 2015-08-31T23:55:57.057
your isp support ipv6 ? remote client might have issue to connect to you – yagmoth555 – 2015-09-01T00:22:13.073
I believe so, It had a field for the IPv6 of the router, I provided the IPv4 as well. I filled out this entry form.
– None – 2015-09-01T00:37:25.090Can you telnet to your service port to see if it's open correctly ? If telnet can, it mean the client got a problem. If it can't, it can be a firewall issue (firewall on the server) – yagmoth555 – 2015-09-01T00:38:56.240
I set up Telnet, and it failed, so it's certainly a firewall issue in that case? I have an inbound/outbound rule, and just tested with windows firewall off but Telnet still failed. I turned off Windows Firewall, is there some other system I should be aware of? – Legato – 2015-09-01T02:15:36.597
You did a telnet ip port ? – yagmoth555 – 2015-09-01T02:51:40.690
Not sure what you're asking. I tried telnet command with public ip address to see if it forwarded correctly, but it said it failed. Though just to test it using the static local server ip, it connected fine. – Legato – 2015-09-01T04:21:45.370
Does your client ever need to accept an incoming connection (for example, does it tell the server "send me messages at this port: XXXXX")? If so, then the client firewall and port forwarding rules would need to be set up as well. That's not always possible, so it's usually better to have the client make outbound connections only. – CBHacking – 2015-09-01T05:00:57.397