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

need way to define IP to bind/listen to. Port= is not sufficent #84

Open
Windows-Is-Cancer opened this issue Jun 23, 2022 · 2 comments
Open

Comments

@Windows-Is-Cancer
Copy link

Tried the endlessh v1.1 package, available with UBUNTU 20.04 LTS Server.
Ran into several problems:

man page mentions default config file, which is missing out of the box.

no endlessh-doc package available so cant lookup further docs or readme's

My Server has multiple interfaces and ip addresses. Therefor i configured the sshd to listen to very specific Interfaces/IPs and Ports . On "internal" interfaces/IPs it listens to standard port 22/tcp. On external interfaces/IPs it listens to a non-standard tcp port.

That means i am unable to run/start entlessh on plain port 22, since it is "in use" on some interfaces/IP addresses, since there seems no option to configure it like the sshd

Here is a partial example sshd conf:

ListenAddress 0.0.0.0:65000
ListenAddress [::]:65000
ListenAddress [::1]:22
ListenAddress 127.0.0.1:22
ListenAddress [fd00:dead:beef:cafe::1]:22
ListenAddress 192.168.0.1:22

Would be cool if endlessh could be configured just like sshd and that it would not bind just to all IPs with one single port.

MANY THANKS for all the work and effort so far!
best wishes
Axel

@bill-mcgonigle
Copy link

That means i am unable to run/start entlessh on plain port 22, since it is "in use" on some interfaces/IP addresses

@Windows-Is-Cancer you can also start it on a high port and use iptables to redirect the low port on your outside interface. I was using the #40 socket arrangements previously (which works for your case), but this is more straightforward for my similar deployment.

e.g.

-t nat -A PREROUTING -i eth0 -p tcp --dport 22 -j REDIRECT --to-ports 2200
-A INPUT -p tcp --dport 2200 -m state --state NEW,ESTABLISHED -j ACCEPT

I guess theoretically my inside users could find the tarpit. :)

@shizunge
Copy link

shizunge commented Jul 2, 2023

It may be easier with docker.
https://docs.docker.com/network/
You can bind the containers port to a host ip+port.

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

3 participants