Linux database connection failed

Source: Internet
Author: User
The IPVs database is installed on the Linux server and cannot be accessed using the client tool. later, I checked the problem with the Linux firewall. after it is disabled, the client can be connected normally, it is very insecure to disable the firewall. Therefore, it is recommended to open the specified port! Linux defense

The IPVs database is installed on the Linux server and cannot be accessed using the client tool. later, I checked the problem with the Linux firewall. after it is disabled, the client can be connected normally, it is very insecure to disable the firewall. Therefore, it is recommended to open the specified port!

A Linux firewall is different from a Windows Firewall. it exists as a service and is disabled as follows:

1. it takes effect permanently and will not be restored after restart

Enable: chkconfig iptables on

Close: chkconfig iptables off

2. it takes effect immediately and recovers after restart

Enable: service iptables start

Disable: service iptables stop

For other services in Linux, you can use the preceding commands to enable and disable the firewall. it is very insecure to disable the firewall. we recommend that you open the specified port as follows:

1. modify the/etc/sysconfig/iptables file and add the following ports to the file:

-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT

-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT

-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 5432-j ACCEPT

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.