setban

Input(s) 4

The setban command allows for the addition or removal of an IP address or subnet from the banned list. This feature is crucial for network management and security, enabling administrators to control access and prevent unwanted connections.

How is this used?

This command is employed to ban specific IP addresses or subnets from connecting to the Bitcoin network. It can be utilized to mitigate spam, prevent attacks, or block malicious nodes. Additionally, it provides flexibility in setting ban durations, either for a specific duration or indefinitely.

Request

method

setban

subnet

Required

command

Required

bantime

Optional

absolute

Optional

Inputs(4)

two required input remaining...

subnet (required) - The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask
command (required) - ‘add’ to add an IP/Subnet to the list, ‘remove’ to remove an IP/Subnet from the list
bantime The duration in seconds (0 or less to ban indefinitely)
absolute If set, the bantime must be an absolute timestamp expressed in UNIX epoch time

Result