Get netfilter rules by chain
GET/p2p/netfilter
Returns the list of all netfilter rules from one chain.
Request
Query Parameters
chain stringrequired
Chain to get the netfilter rules.
Responses
- 200
Success
- application/json
- Schema
- success
- error
Schema
any
Success
{
"rules": [
{
"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"
}
}
},
{
"uuid": "93095688-8ad5-4b9a-ab6b-c9e7b6d1fab5",
"chain": {
"name": "post_peerid",
"table": {
"name": "filter"
},
"policy": {
"type": "NetfilterAccept",
"target_params": {}
}
},
"target": {
"type": "NetfilterLog",
"target_params": {
"msg": "Wat"
}
},
"match": {
"type": "NetfilterMatchPeerId",
"match_params": {
"peer_id": "f7397705bc07aabf6fc3f68de6605d93b560bc832d9ebbdfb0d3bd41e1f9480b"
}
}
}
]
}
Chain not found
{
"success": false,
"message": "Invalid netfilter chain."
}
Loading...