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

tools/geneos: Easy Method for Webserver to run on port 443 #205

Open
itrs-dsobiepan opened this issue Jan 7, 2025 · 2 comments
Open

tools/geneos: Easy Method for Webserver to run on port 443 #205

itrs-dsobiepan opened this issue Jan 7, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@itrs-dsobiepan
Copy link

Currently there's no easy way to let the Webserver run on port 443 by using cordial. The webserver will fail as by Unix standards, ports below 1000 are reserved to root.

Since 443 is a default port for HTTPS, a way to let the webserver run smoothly via cordial on that port would be very nice

@itrs-dsobiepan itrs-dsobiepan added the enhancement New feature or request label Jan 7, 2025
@pgalbavy-itrs pgalbavy-itrs self-assigned this Jan 8, 2025
@pgalbavy-itrs
Copy link
Collaborator

I've been looking at this and every method has pros and cons; In short, the best way is to continue listening on ports 8080/8443 and use iptables (nftables) to redirect traffic like this:

https://gist.github.com/danibram/d00ed812f2ca6a68758e

sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443

and also persist these, either through systemd unit files or other tools. Change network interface to suit, including "lo" for local connections.

The admin then has control, no extra privileges are required for the running process and environment variables and other things are safely preserved.

@itrs-dsobiepan
Copy link
Author

itrs-dsobiepan commented Jan 8, 2025 via email

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

No branches or pull requests

2 participants