support for listening on a unix socket, not a port #680

Closed
opened 2026-10-05 04:38:04 +02:00 by adam · 8 comments
Owner

This is a feature request.

It would be nice if znc supported listening on a unix socket, not a tcp port. I would then use ssh to forward a local port (on my client machine) to the unix socket znc is listening on (on a shared server). I don't want other others of the shared server to be able to connect() to my znc. (I know znc supports passwords but why let them get that far?)

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30631978-support-for-listening-on-a-unix-socket-not-a-port?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
This is a feature request. It would be nice if znc supported listening on a unix socket, not a tcp port. I would then use ssh to forward a local port (on my client machine) to the unix socket znc is listening on (on a shared server). I don't want other others of the shared server to be able to connect() to my znc. (I know znc supports passwords but why let them get that far?) ## <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30631978-support-for-listening-on-a-unix-socket-not-a-port?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:132015945 -->
adam closed this issue 2026-10-05 04:38:04 +02:00
Author
Owner

This would also be useful when reverse-proxying the web panel through some webserver (like nginx).
Doing it with unix sockets would be cleaner, I think, and would allow setting permissions on the socket so that only the webserver can access it.

This would also be useful when reverse-proxying the web panel through some webserver (like nginx). Doing it with unix sockets would be cleaner, I think, and would allow setting permissions on the socket so that only the webserver can access it. <!-- github-comment-id:207853630 -->
Author
Owner

Another use case would be port access control. Most operating systems lack an easy way to restrict access to bind a specific TCP port to a specific user. That means that another user on the same machine can "steal" your port accidentally or intentionally.

With domain sockets, one can use file-system based access control for the sockets and let xinetd to bind the ports on boot time and do the redirection from the port to the domain socket.

Another use case would be port access control. Most operating systems lack an easy way to restrict access to bind a specific TCP port to a specific user. That means that another user on the same machine can "steal" your port accidentally or intentionally. With domain sockets, one can use file-system based access control for the sockets and let xinetd to bind the ports on boot time and do the redirection from the port to the domain socket. <!-- github-comment-id:272108072 -->
Author
Owner

What can be done about this?
https://github.com/jimloco/Csocket/pull/69

What can be done about this? https://github.com/jimloco/Csocket/pull/69 <!-- github-comment-id:676975380 -->
Author
Owner

@cheako Uhm... what do you mean? That's a merged PR that adds the necessary support to Csocket.

@cheako Uhm... what do you mean? That's a merged PR that adds the necessary support to Csocket. <!-- github-comment-id:677659250 -->
Author
Owner

I see that Csocket has support. I didn't realize that means I can use UDS from the ZNC config file, I think there is some glue missing after reading the WIP PR and this "open" issue.

I see that Csocket has support. I didn't realize that means I can use UDS from the ZNC config file, I think there is some glue missing after reading the WIP PR and this "open" issue. <!-- github-comment-id:677751686 -->
Author
Owner

"Support for safely creating UDS with group setting"
I'm not confident in this, did I do the CPP right? There are some important TODOs that need addressing.
https://github.com/cheako/znc/commit/589767e4f20c15f2259a963d464a44ae402cdec8

"Support for safely creating UDS with group setting" I'm not confident in this, did I do the CPP right? There are some important TODOs that need addressing. https://github.com/cheako/znc/commit/589767e4f20c15f2259a963d464a44ae402cdec8 <!-- github-comment-id:678654748 -->
Author
Owner

Any news about this ?

Any news about this ? <!-- github-comment-id:899504042 -->
Author
Owner

I'm out, this project didn't do what I needed and am still using the irccloud platform.

I'm out, this project didn't do what I needed and am still using the irccloud platform. <!-- github-comment-id:899673332 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#680