I
I
icell762020-11-21 13:45:18
iptables
icell76, 2020-11-21 13:45:18

How to disable connection to server from 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.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hint000, 2020-11-22
@icell76

iptables -I INPUT -s 11.22.33.44 -p tcp --dport 5566 -j DROP
iptables -I INPUT -s 11.22.33.44 -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 11.22.33.44 - server IP address
5566 - port number (if only UDP or only TCP is used, then remove two unnecessary rules).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question