LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-28-2007, 12:50 PM   #1
msteiner
Member
 
Registered: Aug 2006
Posts: 41

Rep: Reputation: 15
How to open a port without using iptables


Hi,
I need to open port 636 for ldaps. I am not using iptables so how do I open the port?

Thanks,
 
Old 11-28-2007, 12:58 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
if you aren't using iptables then it's already "open"... it's iptables that would do the closing if it were.
 
Old 11-28-2007, 01:09 PM   #3
msteiner
Member
 
Registered: Aug 2006
Posts: 41

Original Poster
Rep: Reputation: 15
Thanks!

Goes to show how little I know about IP tables...I better hit the man pages.


MS
 
Old 11-28-2007, 02:10 PM   #4
msteiner
Member
 
Registered: Aug 2006
Posts: 41

Original Poster
Rep: Reputation: 15
So iptables is turned off:

[root@webmail ~]# service iptables status
Firewall is stopped.


and if I do a nmap ldaps doesn't show up:
Starting nmap 3.70 ( http://www.insecure.org/nmap/ ) at 2007-11-28 15:08 EST
Interesting ports on webmail.bigrocksports.com (10.9.10.205):
(The 1647 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
110/tcp open pop3
111/tcp open rpcbind
143/tcp open imap
389/tcp open ldap
443/tcp open https
465/tcp open smtps
982/tcp open unknown
993/tcp open imaps
995/tcp open pop3s

If the firewall was turned off, should I still see ldaps when I do a nmap?


However, when I try to telnet to the ldaps port, receive the following:

[root@webmail ~]# telnet webmail.mydomain.com 636
Trying 192.168.0.16...
telnet: connect to address 192.168.0.16: Connection refused
telnet: Unable to connect to remote host: Connection refused

Confused,
MS
 
Old 11-28-2007, 02:21 PM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
A port is opened by an application (called a service, daemon,...)
The IP adress is used to identify your machine.
The Port on this machine identifies a running service.
So if I say I want to speak to 192.168.1.1:666 it means, to the application running on 192.168.1.1 that has opened the port 666.

Iptables is a firewall. It can blocks incoming ( and outgoing) traffic.

In your case, you have nothing running on the port you try to telnet. So you need to start ldaps..

If there is no firewall, your telnet will hit the kernel that will say the port is closed.
If there is a firewall, it will block it even before it arrives in the kernel.

Yay I've never been good for explanations..

You should read a summary about tcp/ip and ports.
 
Old 11-28-2007, 02:23 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
there is no port until something is listening on it. you can see it says it is refused, which is the operating system saying there's nothing there, get lost. you don't have an ldaps service running... check your "ps ax", and "lsof -i" to see what is and is not listening on your server.
 
  


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 a Port in IPtables Doug Vitale Linux - Networking 4 10-14-2007 09:14 PM
i need open samba port by iptables lion_heart_300 Suse/Novell 2 01-05-2007 01:23 PM
Iptables - Port Won't Open stascrash Linux - Security 11 11-09-2006 10:39 AM
iptables won't allow ftp even with port 21 open. keithxl Linux - Security 12 05-22-2006 11:36 PM
open port 10000 by iptables vijaysh Linux - Security 2 12-24-2004 12:55 PM


All times are GMT -5. The time now is 10:03 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration