[SOLVED] Kryonet - Trouble Connecting To VPS

Okay, so, I have client/server code that is programmatically correct.

I have had my VPS running my server code (java -jar myGame.jar) and my client code remotely connect to it fine NP. All was good up until I messed with some firewall settings and installed fail2ban (Linux land is still pretty foreign to me and I’m basically only capable of navigating around and opening files and saying ‘ooh… aah’ to myself).

So now I’m looking at this:

Server-Side:

http://puu.sh/a74k3/40ff5d7b2a.png

Client-Side

http://puu.sh/a74oj/cbcad584a8.png

Some debugging thus far:
Yes I’m connecting to the right IP address 100% guaranteed.
I am getting a response ping from the IP address (~65ms) that the server is on, yet no communication via the Kryonet babies.
Yes I have created a simple Kryonet application to double check my code is solid - and it is not the code.

Kind of weird. This basically leaves the firewall stuff to be the only possible explanation… right? (Also for the record I’m running my server on Ubuntu 14.04 and using Apache2 Web Server)

sudo iptables -L -a

http://puu.sh/a74QT/5eb16aa252.png

I don’t really understand the specifics of this, but the REJECT 127.0.0.0/8 looks like it might be an undesirable behavior? Not sure. ISO help from someone that knows this.

I guess my last resort is an OS reinstall, which would make me a confused sad panda.

Thanks :slight_smile:

Thread can be closed.

For anyone with this issue in the future: I just reinstalled my OS on my VPS (which then made me reinstall Java, Apache, etc.) and running everything normally (java -jar xxxx.jar) then connecting to the IP of the server worked as expected.

http://puu.sh/a7NLh/db69cc5aab.png

More information for anyone in the future: the problem was indeed in Uncomplicated Firewall (ufw) (running Ubuntu 12.04).

Since we know that our server code binds to a port when executed, we also need to specify that specific port to be allowed through the firewall.

After enabling our firewall:

ufw enable

Add firewall rule - where 54555 is the port that our server code is binding (kryonet.Server#bind(PORT))

ufw allow 54555