Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using auth.json file with target verification #543

Open
efi-valkyrie opened this issue Dec 25, 2024 · 2 comments
Open

Using auth.json file with target verification #543

efi-valkyrie opened this issue Dec 25, 2024 · 2 comments

Comments

@efi-valkyrie
Copy link

Hi

I'm using a reversed chisel server with an auth.json file, for example:

{
      "user1:123": ["R:0.0.0.0:5555"]
}

On some remote machine I'm running chisel client with the following command:
.\chisel client --auth "user1:123" <my-server-ip> R:0.0.0.0:5555:<remote-server-ip>

Everything works fine with this setup and the chisel client is authenticated and is limited to 0.0.0.0:5555 only, however I would also like to limit the remote server (<remote-server-ip>) so that the chisel server will only allow port forwarding to closed set of remotes per user, is there a way to do it as well?

Thanks

@jpillora
Copy link
Owner

jpillora commented Dec 25, 2024 via email

@efi-valkyrie
Copy link
Author

efi-valkyrie commented Dec 26, 2024

@jpillora Thanks for the quick replay.
Yeah I saw that its a regex, but my question is whether it can be used to match against the remote host (and port) when working in reverse port forwarding mode (i.e., using the R:<local>:<remote> syntax).

According to the documentation:

...
Addresses will always come in the form "<remote-host>:<remote-port>" 
for normal remotes and "R:<local-interface>:<local-port>" for reverse port 
forwarding remotes. This file will be automatically reloaded on change.

So to clarify, looking at the definition of a remote port forward in reverse mode:
R:<local-interface>:<local-port>:<remote-host>:<remote-port>/<protocol>
Will it be possible to match against the <remote-host>:<remote-port> part using the auth file?

Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants