0

I have the port open and working for root but it is not open for user XYZ. How can I open the port so that user XYZ can access it.

OS : Centos 6.9

Thanks

2 Answers 2

0

Ports numbers below 1024 are privileged and non-root users can't bind to them. How you work around it depends on your situation.

Programs usually drop their extra privileges by changing to non-root user after binding to a port. If that is not an option, you could use iptables to redirect port 465 to a one in above 1024 as a workaround.

-1

This should allow all packets into port 465:

sudo iptables -A INPUT -p tcp --dport 465 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT sudo iptables -A OUTPUT -p tcp --sport 465 -m conntrack --ctstate ESTABLISHED -j ACCEPT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.