Ports added under CentOS cannot be accessed (firewall off)

Source: Internet
Author: User

Recently encountered a depressed problem. For several days did not solve, for help, thank you.

Plan to open a port 15900. However, no matter how to set up a firewall, or simply shut down the firewall. is not accessible by external machines (in the same intranet segment machine).

There is no problem with native access (127.0.0.1). There should be no problem with the firewall configuration.

Iptables Status:

copy content to clipboardCode: Chain INPUT (Policy ACCEPT)
Target Prot opt source destination
ACCEPT all – anywhere anywhere state related,established
ACCEPT ICMP-Anywhere anywhere
ACCEPT All-anywhere anywhere
ACCEPT TCP--Anywhere anywhere state NEW TCP dpt:ftp
ACCEPT TCP--Anywhere anywhere state NEW TCP DPT:SSH
ACCEPT TCP--Anywhere anywhere state NEW TCP Dpt:http
ACCEPT TCP--Anywhere anywhere state NEW TCP dpt:15900
REJECT All-anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (Policy ACCEPT)
Target Prot opt source destination
REJECT All-anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (Policy ACCEPT)
Target Prot opt source destination

The input lsof-i displays the following information.

copy content to clipboardCode: NTPD 1640 NTP 21u IPv4 13492 0t0 UDP 192.168.2.111:ntp
Master 1720 Root 12u IPv4 13709 0t0 TCP localhost.localdomain:smtp (LISTEN)
httpd 1730 Root 4u IPv6 13843 0t0 TCP *:http (LISTEN)
httpd 1737 Apache 4u IPv6 13843 0t0 TCP *:http (LISTEN)
httpd 1738 Apache 4u IPv6 13843 0t0 TCP *:http (LISTEN)
httpd 1739 Apache 4u IPv6 13843 0t0 TCP *:http (LISTEN)
httpd 1740 Apache 4u IPv6 13843 0t0 TCP *:http (LISTEN)
httpd 1741 Apache 4u IPv6 13843 0t0 TCP *:http (LISTEN)
httpd 1742 Apache 4u IPv6 13843 0t0 TCP *:http (LISTEN)
httpd 1743 Apache 4u IPv6 13843 0t0 TCP *:http (LISTEN)
httpd 1744 Apache 4u IPv6 13843 0t0 TCP *:http (LISTEN)
Xvnc 1776 Root 4u IPv4 14282 0t0 TCP localhost.localdomain:15900 (LISTEN)
Clock-app 2111 Root 21u IPv4 26309 0t0 TCP 192.168.2.111:48606->65.113.31.147:http (close_wait)
sshd 2281 Root 3r IPv4 20572 0t0 TCP 192.168.2.111:ssh->192.168.2.61:57678 (established)

192.168.2.111 is a machine IP

As you can see, port 80, 21,22, is fine. But the port that you added later is not accessible. Is there no binding with the service?

The key phrase "localhost.localdomain:15900 (LISTEN)"

Firewall off, SELinux shutdown still doesn't solve the problem

Solve! VNC configuration issues. I didn't see it clearly. Depressed...

copy content to clipboardCode: VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp -localhost"

Problem is in localhost, delete-nolisten tcp-localhost solve

Ports added under CentOS cannot be accessed (firewall off)

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.