Centos Open 80 Port

Source: Internet
Author: User


#/sbin/iptables-i input-p TCP--dport 80-j ACCEPT
#/sbin/iptables-i input-p TCP--dport 22-j ACCEPT

Then Save:
#/etc/rc.d/init.d/iptables Save

Check to see if it already has:
[Email protected] ~]#/etc/init.d/iptables status
Table:filter
Chain INPUT (Policy ACCEPT)
Num Target prot opt source destination
1 ACCEPT UDP--0.0.0.0/0 0.0.0.0/0 UDP dpt:80
2 ACCEPT TCP--0.0.0.0/0 0.0.0.0/0 TCP dpt:80
3 Rh-firewall-1-input All--0.0.0.0/0 0.0.0.0/0

Chain FORWARD (Policy ACCEPT)
Num Target prot opt source destination
1 Rh-firewall-1-input All--0.0.0.0/0 0.0.0.0/0
Two. Restart your computer.

1.CentOS operating system firewall is already open 80 and 22 ports by default

2. You should also not restart your computer here:
#/etc/init.d/iptables restart
Shut down the firewall and shut down its services:

3. View firewall information:
#/etc/init.d/iptables status

4. Turn off the Firewall service:
#/etc/init.d/iptables stop

Three. Permanently shut down the firewall

We can also permanently shut down the firewall, but I don't recommend it. Permanently shutting down the firewall can do this:
#chkconfig –level iptables off
You can also directly modify
/etc/sysconfig/iptables
Add a
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT


Source: http://www.cnblogs.com/cnjava/p/3311950.html

Centos Open 80 Port

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.