Bind to ports less than 1024 without root access [duplicate]

Another way of getting your daemon to respond to requests from a lower port number is to use iptables or similar to redirect a lower numbered port to the higher numbered port that your daemon is listening on:

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

Substitute 80 with the port to expose, and 8080 with your application listener port.

Leave a Comment