Open LDAP Server TCP Ports on Linux 6.5

What ports should be open in iptables to allow LDAP traffic on your linux server?

Ports 389 and 636

There are a couple ways of doing this.

1. Install nano

yum install nano

2. Edit iptables

nano /etc/sysconfig/iptables

3. These rules work in CentOS version 6.5

-A INPUT -p tcp -m tcp --dport 389 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 636 -j ACCEPT

4. Press Ctrl+X to exit, “Y” to save, and Enter

5. Start or restart iptables depending on its current state

service iptables start

Or

servcie iptables restart

How To Ping Device Using Port Number from Linux

I used nmap and it works like a charm

yum install nmap

[root@apache02 ~]# nmap -p 80 app.testdomain.com

Output:

Starting Nmap 5.51 ( http://nmap.org ) at 2014-06-11 20:48 BST
Nmap scan report for app.testdomain.com (172.16.165.229)
Host is up (0.22s latency).
PORT STATE SERVICE
80/tcp filtered http

Nmap done: 1 IP address (1 host up) scanned in 2.59 seconds