bitcoind.app
CommandsGuidesContact ↗
Home/Network/setban
Network

setban

Attempts to add or remove an IP/Subnet from the banned list.

Parameters

subnetstringREQUIRED
The IP/Subnet with optional netmask
commandstringREQUIRED
"add" or "remove"
bantimenumberoptional
Time in seconds. Default: 0 = 24h
absolutebooleanoptional
If true, bantime is absolute UNIX epoch time

Returns

nullnull on success

Code Examples

curl --user myuser --data-binary '{"jsonrpc":"1.0","id":"1","method":"setban","params":["192.168.0.6","add",86400]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/

Example Response

null
← Previous
ping
Next →
setnetworkactive

More Network Commands

addnodeclearbanneddisconnectnodegetaddednodeinfogetconnectioncountgetnettotals

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗