How Do I Unlock Debian / Ubuntu so I can open up port 25 connections (send and receive) and so taht I can bind sockets to local ips?

I am an application developer using netbeans on ubuntu 7.10... I am writing an application which requires me to be able to open up and listen on port 80, and on port 25. Whenever I try to listen on these ports I am told they are in use by the operating system and the exception that is thrown in java, however, I dont have apache installed nor do I have sendmail or postfix installed. I have checked thoroughly through the package manager looking for a web service or mail service and there is nothing. So my next th0ought was maybe theres some policy in iptables, so I shut iptables down, and nothing. Then I removed iptables completely and still nothing.

Can someone please tell me how to clear these ports, and limitations so that I can listen on these ports, and bind sockets to local IP addresses?

Worth 500 points.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Is the app running as root?  if not you will have trouble binding to the low numbered ports even if no other service is using them.  Its a linux security thing, root needs to bind to the low numbered ports.

There are a host of tools out there to check to see if a service is running on a port, have you made sure that NO OTHER service is using the ports you want to use.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Are you running the application as root?
You may run

lsof -i4:25
lsof -i4:80

this will give you process name and process id that is listening on port 25 and 80

Then you may find the startup script for that application and disable it.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

richardsimnettAuthor Commented:
I am not running as root. I am running as my username rick in gnome.. I can sudo in a terminal session.

richardsimnettAuthor Commented:
there are no processes listed at all with those commands, except for a few outbound firefox connections.

Ok, if you want to test your self, then try

telnet 0 25
telnet 0 80

If you get connection refused message it means that no process is running that is listening.

For you to be able to run applications that listen to ports below 1024 , you need to be root. So

 su - root

then start the applications
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.