How I can ban users?

hello, I want ban offline users and ban by IP address.

I try to edit the bans.cfg but no work and after restart the server the new users added editing the bans.cfg disappear.

**Is possible add the users from .cfg file and reload the .cfg from the console server?
**
(If the user are online is very easy ban and are saved correctly).

Also I want know if is possible ban by IP, because the hackers created another steam account and share the game with this account.

Sorry for my english.
Thanks in advance, regards.

no ban by IP yet without mods/rcon tool unfortunately

Good way is to use the F1 console provided you are ranked, type it like this

For Names:

ban “PlayerName” "Reason"

For UID (recommended) (will ensure the players don’t just change their name and join back in

banid “765644994444444” “PlayerName” "Reason"

Get the players UID by typing status or players in the console. Also if banning from Rusty or similar make sure you do a server.writecfg to write the ban into the bans.cfg file

Perfect, work fine, thanks you!

Now I want know if is possible ban by ip.

Regards.

Been running some gameservers in my community couple of years (CS:GO, TF2 and Killing Floor).
That been said, IP is dynamic (if static it is GOOD) and not the very best way to ban someone. Do to proxy networks everyone can use or might have an ISP that changes IP now and then. So with some bad luck they might get back in, and bypass that IP ban.

Might be better to stick with Steam ID.