How to prevent connection to the server from the server IP?
Hello. We have a small game hosting. There is a modification that launches bots on the server (it is located on our equipment), while from the same server (that is, the same IP of the server and incoming connections, bots).
How can you limit this? With some rules. We will be glad to help.Ubuntu Anonymous, Mar 12, 2020
iptables -I INPUT -s 18.104.22.168 -p tcp --dport 5566 -j DROP
iptables -I INPUT -s 22.214.171.124 -p udp --dport 5566 -j DROP
iptables -I INPUT -s 127.0.0.1/8 -p tcp --dport 5566 -j DROP
iptables -I INPUT -s 127.0.0.1/8 -p udp --dport 5566 -j DROP
here 126.96.36.199 - server IP address
5566 - port number (if only UDP or TCP is used, then remove two unnecessary rules).Anonymous
To place the code, please use CodePen or similar tool. Thanks you!