I know it is iptables rule, but I don't know how to make it

addhook("join","join_hook") function join_hook(id) if (player(id,"ip")==x.x.x.x) then parse("") end end
addhook("join","join_hook") function join_hook(id) if (player(id,"ip")~="0.0.0.0" and not player(id,"ip"):find("192.168.")) then parse("kick ".. id .." \"Your IP is banned\"") end end