Add p2p netfilter rule
POST/p2p/netfilter
Add netfilter rules.
Request
- application/json
Body
required
Netfilter rule data to add.
chain
match
match_params
target
target_params
Responses
- 200
Add rule.
- application/json
- Schema
- success
- error
- error2
Schema
any
Rule added
{
"success": true,
"uuid": "93095688-8ad5-4b9a-ab6b-c9e7b6d1fab5",
"chain": {
"name": "post_peerid",
"table": {
"name": "filter"
},
"policy": {
"type": "NetfilterAccept",
"target_params": {}
}
},
"target": {
"type": "NetfilterReject",
"target_params": {}
},
"match": {
"type": "NetfilterMatchPeerId",
"match_params": {
"peer_id": "f7397705bc07aabf6fc3f68de6605d93b560bc832d9ebbdfb0d3bd41e1f9480b"
}
}
}
Invalid chain
{
"success": false,
"message": "Invalid netfilter chain."
}
Invalid match
{
"success": false,
"message": "Invalid netfilter match."
}
Loading...