-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
Reverse tunnel listen interface #587
Comments
Interesting, thanks for sharing! This is a bug and we should fix it. Can you submit a PR to fix? It should be pretty simple to search for the places we call bind() and figure out which one is for tunneling. |
} else {
PortForwardSourceRequest pfsr;
+++ pfsr.mutable_source()->set_name("localhost");
pfsr.mutable_source()->set_port(stoi(sourceDestination[0]));
pfsr.mutable_destination()->set_port(stoi(sourceDestination[1]));
pfsrs.push_back(pfsr);
} at this point the ip is being controlled by the client and etserver just binds the socket to a requested ip (localhost in this case), also it may be later converted to an option or smth for the client. On the other hand it can be hardcoded on the etserver side, ex. here: ForwardSourceHandler::ForwardSourceHandler(
shared_ptr<SocketHandler> _socketHandler, const SocketEndpoint& _source,
const SocketEndpoint& _destination)
: socketHandler(_socketHandler),
source(_source),
destination(_destination) {
+++ source->set_name("localhost");
socketHandler->listen(source);
} What solution is preferable? |
Yep, agreed that the first way makes the most sense. |
Ofc not that easy) Fails because of this. Btw it doesn't make sense for me to perform this check and fail while the |
That check was to prevent a different issue. If the name is "localhost" we can skip that check (i.e. let's change the check to allow localhost through) |
At this point it will be identical to just hardcoding localhost on the server. I think that theoretically server can listen for any host/ip that is specified by the client. if (!pfsr.has_source()) {
// pipe stuff
} else if (pfsr.source().has_port()) {
// tcp stuff
} else {
// error
} |
Hmm, i misunderstand this a bit, if |
At the end of the day i see this as a right solution lostystyg#1 |
That makes sense to me. Please submit a PR, thanks! |
According to this comment
anything that goes to localhost:4321 on the server will be received by 2224 on the local machine
but it definitely binds the socket to 0.0.0.0 instead of localhost and thus every outside connection can reach my local lemonade clipboard service while i definitely want it to be accessible only by the server i am connecting to.E.x.
while using plain ssh:
Notice that sshd listens for
127.0.0.0
and et listens for*
.Is it a bug, feature or requires an option to control the behavior?
The text was updated successfully, but these errors were encountered: