Replies: 6 comments 21 replies
-
Interesting, what specific controls would be managed via JSON-RPC? |
Beta Was this translation helpful? Give feedback.
-
This sounds similar to the white-list that has been mentioned on occasion. I would like the white-list part of your idea to be accessible with a simple command line interface also (parameters passed when server or client is started). |
Beta Was this translation helpful? Give feedback.
-
If a white-list or black-list via json is accepted, then a white-list via command line must be accepted when someone decides to do it. |
Beta Was this translation helpful? Give feedback.
-
For those interested in this topic, I have an initial version of this concept that can be found here (https://github.com/Rob-NY/jamulus/tree/feature_firewall). The JSON-RPC method documentation is included. Thanks to @rdica for real-life session testing and for testing IPv6. In a nutshell, access control is governed by two elements: the mode (there are two), and the IP list. Mode 0 is "open mode". All clients will be permitted EXCEPT those on the list. RPC methods available are documented in docs/JSON-RPC.md and include: jamulusserver/setFirewallMode All IP addresses added/removed from the list should be strings in standard IPv4 notation x.x.x.x or IPv6 notation with no brackets. This implementation ONLY supports IP addresses -- no port qualification. This is by design. Further, no attempt was made to actively remove the connection in Jamulus. Instead, blocked clients will timeout just as they would with an edge or OS-based firewall. For now, this is also by design. Thoughts and feedback are welcomed. FWIW: This is implemented using string hash comparisons. I realize I can use other, potentially more efficient means, and these will be considered down the road. |
Beta Was this translation helpful? Give feedback.
-
Also maybe not use firewall but maybe something like AccessList to avoid ambiguity with the system firewall. |
Beta Was this translation helpful? Give feedback.
-
I noticed "internal access control list" in the source code. If this internal Access Control List could be loaded with data from a config file at server start-up, this would make whitelist/blacklist accessible from the command line. |
Beta Was this translation helpful? Give feedback.
-
I realize this has been discussed many times in different threads. Today, there are (at least) three options for controlling access to a Jamulus server:
While there is great debate surrounding this issue, it isn't necessarily a bad idea to provide server operators with some basic tools to manage private servers or react to the occasional bad actor directly using the Jamulus server as opposed to 1 or 2 above (i've personally used 2 for my solution in the past).
With this in mind, I've put together a proof of concept that introduces basic, light-weight access control at the socket level. In a nutshell, it uses two attributes: A "mode", and a "list".
There are two modes: Open and Closed. The list is a list of IP's (address only, not address:port)
In OPEN mode, all packets are ACCEPTED except for those coming from IP's on the LIST.
In CLOSED mode, all packets are REJECTED except for those coming from IP's on the LIST.
All control for this proof-of-concept is handled through the JSON-RPC interface.
I'm interested in people's thoughts on this approach and to gauge whether a PR down the road would even be considered. I'm also looking for server operators who have worked with JSON-RPC who might like to do some testing with me.
Beta Was this translation helpful? Give feedback.
All reactions