ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

centos7.2放行80端口

2020-01-29 20:02:27  阅读:535  来源: 互联网

标签:iptables 28 端口 firewalld usr 507 centos7.2 80 localhost


[root@localhost bin]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since 三 2020-01-29 03:28:08 PST; 20min ago
Docs: man:firewalld(1)
Main PID: 507 (firewalld)
CGroup: /system.slice/firewalld.service
└─507 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid

1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete FORWARD --destination 192.168.122.0/24 --out-interface virbr0 --match conntrack --ctstate ...in that chain?).
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete FORWARD --source 192.168.122.0/24 --in-interface virbr0 --jump ACCEPT' failed: iptables: B...in that chain?).
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete FORWARD --in-interface virbr0 --out-interface virbr0 --jump ACCEPT' failed: iptables: Bad ...in that chain?).
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete FORWARD --out-interface virbr0 --jump REJECT' failed: iptables: No chain/target/match by that name.
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete FORWARD --in-interface virbr0 --jump REJECT' failed: iptables: No chain/target/match by that name.
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete INPUT --in-interface virbr0 --protocol udp --destination-port 53 --jump ACCEPT' failed: ip...in that chain?).
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete INPUT --in-interface virbr0 --protocol tcp --destination-port 53 --jump ACCEPT' failed: ip...in that chain?).
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete OUTPUT --out-interface virbr0 --protocol udp --destination-port 68 --jump ACCEPT' failed: ...in that chain?).
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete INPUT --in-interface virbr0 --protocol udp --destination-port 67 --jump ACCEPT' failed: ip...in that chain?).
1月 29 03:28:09 localhost.localdomain firewalld[507]: WARNING: COMMAND_FAILED: '/usr/sbin/iptables -w10 -w --table filter --delete INPUT --in-interface virbr0 --protocol tcp --destination-port 67 --jump ACCEPT' failed: ip...in that chain?).
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost bin]# sudo firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eno16777736
sources:
services: dhcpv6-client ssh
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:

[root@localhost bin]# sudo firewall-cmd --add-service=http --permanent
success
[root@localhost bin]# sudo firewall-cmd --add-port=80/tcp --permanent
success
[root@localhost bin]# sudo firewall-cmd --reload
success
[root@localhost bin]# sudo firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eno16777736
sources:
services: dhcpv6-client http ssh
ports: 80/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:

[root@localhost bin]#

标签:iptables,28,端口,firewalld,usr,507,centos7.2,80,localhost
来源: https://www.cnblogs.com/michaelcnblogs/p/12241109.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有