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

Allow MYSQL Server Incoming Request In Iptables

I’ve read many forums regarding SELinux and iptables in CentOS and Linux. Most say disable them but in most corporate environments, that’s just not an option. Most of our servers are private and can only be accessed if connected via VPN. There are a few that face the public. In any case, it’s either keep your firewalls down and face the wrath or learn how to configure SELinux or iptables. As of right now, I disable SELinux due to my lack of knowledge of it.

To allow incoming request on MYSQL servers running iptables, you need to allow on port 3306.

On our CentOS version 6.5, this is done by adding the rule to the iptables config file.

nano /etc/sysconfig/iptables

 

Add the following line just beneath the entry for the default rule regarding tcp port 22:

-A INPUT -p tcp -m tcp –dport 3306 -j ACCEPT

Press Ctrl+X, “Y” to save and press the Enter key to complete the process.

 

Make sure iptables is enabled:

service iptables status

 

If running, restart the iptables by issuing the following command:

service iptables restart

 

If not running, issue this command:

service iptables start

 

There may be other variables but I know this works for certain on CentOS 6.5.

WordPress Import Failure Blank Screen

When trying to import a WordPress XML dump from another instance, after submitting the upload it returned a blank screen containing only “Import WordPress”.

A quick check of the php logs showed the entry:

PHP Fatal error: Class ‘DOMDocument’ not found in /home/xxxxxx/wp-content/plugins/wordpress-importer/parsers.php on line 61

You just need to install the php-xml module.

yum install php-xml

service restart httpd

Refresh your browser and try it again. Should be all good.