Java program unable to bind ports
I'm running Fedora and have a Java program that attempts to bind ports 162 and 165 (SNMP). It is unable to bind these ports and gets an exception which says that "permission denied".
I have the software firewall turned off and am not running the snmptrapd service. The snmpd service is running, which binds to the agent port 161 - so no conflicts there. I see nothing already bound to ports 162 and 165 when I run netstat.
I found the hosts.allow file in the /etc directory, and tried putting this line into it: "ALL:ALL:ALLOW" from one of the help file examples - no effect on the errors.
Can anyone tell me what if any security mechanisms may be stopping my program from accessing these ports, and how I can configure things to let it run correctly?
Thanks - Dave
Re: Java program unable to bind ports
Any program attempting to bind to a port below 1024 must be started as root for security. The idea was that a user on the box could not "killall sendmail" and then start their own version with "extra functionality" without having admin privs on the machine.
Originally Posted by davebp