Quantcast
Channel: LowEndTalk
Viewing all articles
Browse latest Browse all 40417

iptables: Banning IPs from .txt file & adding them 'on the fly' ?

$
0
0

I run a gameserver and every now and then I have to deal with cheaters. For some reason these clowns manage to either nullify or spoof their GUIDs so that I cannot ban them the normal way. Therefore I have to ban their IPs and hope that they are retarded enough not to use a VPN or have a dynamic IP.
To do so I'm using iptables, with the following command:
iptables -A INPUT -s XXX.XXX.XXX.XXX -p udp -m udp --dport 28960:28965 -j DROP
However, I also want to give my friends the opportunity to ban cheaters when I'm not online. Therefore I'm looking for some sort of way/script to ban IP's.
Personally, I was thinking of storing IPs in an .txt file which I can have my friends edit using OneFileCMS or something. Then some cronjob should issue a script every minute so that these new IPs will be added to the firewall. My problem is however, how do I recursively load IPs from another file into iptables using the command above?
If you guys have any other suggestions I would love to hear them as well :)

Thanks!


Viewing all articles
Browse latest Browse all 40417

Trending Articles