LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-10-2008, 03:27 AM   #1
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Rep: Reputation: Disabled
How do I open a specific port for network?


Hello all,

I have installed Qmail with addons. It also has courierpassd installed on port 106.
I need to open the port to accept connections atleast for the localhost.
I tried it with iptables but still connections are being refused.
 
Old 07-10-2008, 03:39 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
First rule of thumb until you are skilled at iptables, disable iptables while configuring new server software to work. Then, once it works, reenable your firewall with the appropriate rules for the new service.

so, does it all work w/out any iptables/?
 
Old 07-10-2008, 03:49 AM   #3
sai_tejas
LQ Newbie
 
Registered: May 2008
Posts: 23

Rep: Reputation: 15
Yup,stoping iptables would work .
Firsly check whether the port is in listening state..
using netstat -a,
If it is nt,try stopping iptables service..
 
Old 07-10-2008, 03:50 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
That was what I did.
Iptables were disabled while configured courierpassd and qmail.
Now I need to open 106 for courierpassd to run.
Without or with iptables the port 106 was closed.
I need to explicitly open it.
I tried using iptables but still the port is closed.

Last edited by linuxlover.chaitanya; 07-10-2008 at 03:51 AM.
 
Old 07-10-2008, 06:10 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Well man even with iptables flushed out nmap does not show 106 port number to be open.
Explicitly accepting connections through iptables does not seem to be the option as the port itself is closed. Once it is open iptables can be used to accept the connections.
But first for that nmap should show the status of 106 to be open. And that is what I need.
 
Old 07-10-2008, 12:17 PM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Quote:
Now I need to open 106 for courierpassd to run.
No, you don't open the port. The successful configuration and starting of the courierpassd application opens the port.

Don't use nmap as your diagnostic, it is the wrong tool for the job. Use netstat:

Code:
netstat -an | grep 106
tcp        0      0  127.0.0.1.106          *.*         LISTEN
If you don't have this line, you have not started courierpassd correctly. Do you see it in your process output ?

Again, stop wasting your time with iptables - you don't have the program working correctly yet.
 
Old 07-11-2008, 12:06 AM   #7
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
In the documentation itself it is clearly mentioned that courierpassd needs port 106 to be open.
And that seems correct as I can not telnet localhost on port 106.
The service courierpassd is running. Explicitly starting it from the location starts the operation and I can change the password for the user.
Now if the documentation says that port be open then I would not like to argue on that.
 
Old 07-11-2008, 12:29 AM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
You're confused.

You said iptables was flushed out. So we're not talking about opening ports in IPTABLES. We're only talking about courierpassd. What I am trying to communicate is that courierpassd opens port 106 and listens for incoming connections. You don't have to do anything to make that part happen - just start courierpassd.

Now we're talking about an entirely different matter if you have OTHER TCP/IP blocks in the way.

Show data - show the output of the netstat command.

Without further data, I can't see that we're going to make any progress.
 
Old 07-11-2008, 01:01 AM   #9
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
netstat does not show any output.
But courierpassd is shown as on in chkconfig.
 
Old 07-11-2008, 01:09 AM   #10
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
If netstat does not show the port open, and ps does not show courierpassd as running, it is NOT running.
 
Old 07-11-2008, 01:21 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
HOWDY.....how did I miss ps???
Thanks for that
 
Old 07-11-2008, 01:30 AM   #12
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
This is the output of the ps command on the system.

#ps aux | grep courierpassd
root 2814 0.0 0.0 3880 680 pts/1 S+ 11:58 0:00 grep courierpassd
 
Old 07-11-2008, 01:34 AM   #13
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
I hope you have now convinced yourself that courierpassd is not running.
 
Old 07-11-2008, 01:47 AM   #14
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
This is really annoying.
How do I start it?
Giving command courierpassd on terminal works for me. I can then change the passowrd for the user.
But I want this to start it automatically.
How can this be done?
I went with the steps that are given in qmailrocks.org.
 
Old 07-11-2008, 01:54 AM   #15
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Ok, good. Now we can get down to business. In the README, there is this:

Code:
Courierpassd is designed to be run from a super-server such as tcpserver
or xinetd. The poppassd protocol is used to talk to client programs to
obtain authentication tokens.
So, have you created the proper xinetd.d/courierpassd file, or added the clause to xinetd.conf ? If so, show that configuration.

Or you may have inetd (instead of xinetd). In that case, show the line you added to inetd.conf.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to open port on iptables locked on a specific internal MAC address? blackman890 Linux - Security 2 10-05-2007 02:16 AM
Snort sniffing specific port and network protocol Palula Linux - Software 1 01-06-2006 02:33 AM
security newbie...turning off a specific network port jys88 Linux - Security 2 12-14-2005 04:22 PM
Fire wall configuration...disable firewall or open a specific port naveenViador Linux - Security 2 04-13-2004 03:36 PM
Howto monitor network trafic on specific port MDanger Linux - Networking 2 03-31-2004 01:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration