Channel disconnect are happening mostly because of this reasons:
1. Bug dungeon boss/mobs.
- It is happening when player hit the boss or mobs inside the dungeon or counterwise. It takes me 1 whole day to figure out which boss is causing that channel crash. On my case it's the last boss on B3F. (You need to figure it out on the client you are using)
2. Sending invalid packets.
- They are sending invalid packets into your IP and channel ports that is causing it to disconnect. On this case you need to download any tool available that can capture packets or you can simply use this command on your linux:
yum/apt install tcpdumptcpdump -n -s0 -vv -A
Here for disabled dns/port resolution:tcpdump -AnnvvvS
To use it only in a specific port:tcpdump port 38121 -n -s0 -vv -A
If you want to save the output to a file to read with wireshark for example then add the -w parameter with file name afterwardsIt'll be in the pcap format which wireshark can read.
Example: tcpdump port 38121 -n -s0 -vv -A -w port38121.pcap
Then Download it to your computer and open it with wireshark.
Your tcpdump needs to be running and active when the channel crash happened to show those specific packets/packet length that is causing the crashing of your channels. You can block those packets now and it will fix your problem.
If you will follow and understand this solutions carefully, It will sure fix your problem 100%. Trust me as i've been in your situation few years ago and I managed to defend my server from those devil server attackers.
PS: To save hard disk space, You can delete logs every after 30 minutes.
I hope that I helped you with this information. If you do not understand packets or if you personally need help on blocking it, just let me know and I will be glad to help. Good luck!