Articles of firewalld

简单安全的firewalld只允许ssh?

我升级到CentOS 7并学习firewalld。 当我build立一个新的服务器,我的默认iptableconfiguration最好的安全性(我相信这是一个非常标准的configuration): # IPv4 iptables -F iptables -A INPUT -p tcp –dport 22 -j ACCEPT iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT /sbin/service iptables save iptables -L -v # IPv6 ip6tables -F ip6tables […]

火焰之源:掉落和封锁区的来源

我无法获得附属于这些区域的资源的区块服务。 我想知道source-> zone <-service的目的是什么..! 我试图使用默认区域作为启用less量服务的放置区域。 它工作正常。 但是,我希望ICMP拒绝来自networking掩码(例如172.128.0.0/16)的数据包,但是在启用了一些服务的情况下,放弃其他所有内容。 所以我把networking掩码添加到块区域的源列表中,并启用了上述服务。 但我不能得到任何服务工作的这些源地址..! 我很困惑! 帮帮我? 防爆。 block interfaces: sources: 172.128.0.0/16 services: bacula bacula-client dhcpv6-client ssh http ports: masquerade: no forward-ports: icmp-blocks: rich rules: drop (default, active) interfaces: em1 sources: services: bacula bacula-client dhcpv6-client ssh http ports: masquerade: no forward-ports: icmp-blocks: rich rules:

joinhttp时出现firewalld错误

我试图在CentOS 7(新数字海洋图像)的firewalld公共区域添加http。 有人请纠正我,如果这不是正确的/安全的方式,使我的网站可以通过firewalld访问。 我有的问题是: [root@wilberforce ~]# firewall-cmd –add-service=http Error: COMMAND_FAILED: '/sbin/iptables -A IN_public_allow -t filter -m tcp -p tcp –dport 80 -m conntrack –ctstate NEW -j ACCEPT' failed: iptables: No chain/target/match by that name. Failed to apply rules. A firewall reload might solve the issue if the firewall has been modified using ip*tables or ebtables. […]

是firewalld阻止返回stream量?

我在Debian 7试图通过firewalld转发请求到其他机器,并有以下设置: –HOSTNAME– —-IP—– ————Configuration————- Firewall 192.168.0.2 (Debian 7, firewalld, static ip) DHCP 192.168.0.3 (Debian 7, isc-dhcp-server, static ip) DNS (Master) 192.168.0.4 (Debian 7, bind9m, static ip) DNS (Slave) 192.168.0.5 (Debian 7, bind9, static ip) 我的防火墙规则在DNS(主从) <zone> <short>Public</short> <port protocol="udp" port="53"/> <port protocol="tcp" port="53"/> </zone> 我的firewalld规则在防火墙上 <zone> <short>Public</short> <forward-port to-addr="192.168.0.4" to-port="53" protocol="tcp" port="53"/> <forward-port to-addr="192.168.0.4" […]

CentOS 7.2.1511 libvirt防火墙configuration

我有几个CentOS7的设置,我使用iptables转发端口从主机到客人。 最近,我更新到7.2.1511,似乎libvirt坚持firewalld是积极的,直接使用iptables命令。 以下是我的虚拟networkingVMmaint的XMLconfiguration。 <network connections='11'> <name>VMmaint</name> <uuid>2d218af6-b374-41b3-8a7e-2de7a02e62a9</uuid> <forward dev='em1' mode='nat'> <nat> <port start='1024' end='65535'/> </nat> <interface dev='em1'/> </forward> <bridge name='VMmaint' stp='on' delay='0'/> <mac address='52:54:00:ab:82:15'/> <ip address='192.168.100.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.100.10' end='192.168.100.254'/> <host mac='52:54:00:f7:df:11' ip='192.168.100.11'/> <host mac='52:54:00:f1:bb:18' ip='192.168.100.12'/> <host mac='52:54:00:cf:33:59' ip='192.168.100.13'/> <host mac='52:54:00:57:e2:6a' ip='192.168.100.14'/> <host mac='52:54:00:72:8e:ce' ip='192.168.100.15'/> <host mac='52:54:00:25:3e:34' ip='192.168.100.16'/> <host mac='52:54:00:8a:31:3e' ip='192.168.100.17'/> <host mac='52:54:00:dd:5f:dd' ip='192.168.100.18'/> […]

如何为特定于源的规则configurationfirewalld?

我在一个数据中心有一台服务器,作为IPA主服务器和VPN服务器。 为了简单起见,假设我需要为VPN启用“ipsec”服务,为IPA启用“kerberos”服务。 我想:1)允许来自任何地方的stream量访问ipsec端口。 2)只允许来自私有IP空间的stream量访问Kerberos端口。 这似乎很容易, 将源IP空间添加到“工作”区域,在“工作”区域中打开“kerberos”,在“公共”区域中打开“ipsec”。 但是,我的界面“eth0”只附加到“公共”区域。 看起来像一个接口只意味着适用于一个单一的区域。 所以我有两个问题。 首先,我想做些什么合理的事情? 其次,用firewalld实现我的目标的正确的使用模式是什么? 作为一个例子,我知道我可以用丰富的规则来实现我的目标,但是这听起来像是应该使用区域来完成的事情。

使用firewalld阻止Centos 7上的传出连接

我有以下规则: public (default, active) interfaces: eth0 sources: services: dhcpv6-client http https ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules: 一切工作正常,然后我添加以下直接规则: ipv4 filter OUTPUT 0 -m state –state ESTABLISHED,RELATED -j ACCEPT ipv4 filter OUTPUT 1 -p tcp -m tcp –dport 80 -j ACCEPT ipv4 filter OUTPUT 1 -p tcp -m tcp –dport 443 -j ACCEPT ipv4 […]

yum更新后,Firewall-cmd挂起

当我使用firewall-cmd它挂起,我只是做了一个更新与yum和得到python (2.7.5)和kernel 。 我使用CentOS 7时,当我做sudo systemctl status firewalld.service我得到了: Active: active (running) 。 当我这样做时: ps aux | grep fire ps aux | grep fire它显示: root 15616 0.0 0.4 249448 20088 ? Ss 22:18 0:00 /usr/bin/python -Es /usr/sbin/firewalld root 17687 0.0 0.0 335772 472 ? Ssl jul10 0:00 /usr/bin/python -Es /usr/sbin/firewalld –nofork –nopid 我该如何解决firewall-cmd的挂?

firewalld傀儡模块无法添加多个来源错误:第二个来源的无效区域

我们有一个木偶模块(v3.6.2,因为我们正在使用它的卫星6) 除了将多个源添加到区域时,该模块按预期工作。 它将添加该区域,然后添加一个源,然后错误地尝试将第二个源添加到区域与消息: INVALID_ZONE: backup 第二次运行模块成功添加源2和3。 该区域正在成功创build,并且正在触发firewalld重新加载,但几乎没有完成重新加载,因为它不会将新添加的“备份”区域视为对第二个和第三个源有效。 模块代码: class firewalld( $enabled = true, $package_name = 'firewalld', $service_name = 'firewalld', $config_dir = '/etc/firewalld', $zone_create = [], $zone_remove = [], $zone_set_default = '', $zone_add_source = hiera_hash('firewalld::zone_add_source', { }), $zone_add_service = hiera_hash('firewalld::zone_add_service', { })) { if $enabled { $service_ensure = 'running' $service_enable = true $package_ensure = 'present' $config_ensure […]

如何打开sendmail接收端口

我试图打开端口25从我的服务器使用sendmail接收邮件。 我想用阿尔卑斯山阅读我的邮件,我什么也不需要。 我试过这个: firewall-cmd –zone=public –add-port=25/tcp 连接被此命令接受 telnet 127.0.0.1 25 但是被这个拒绝了 telnet mydomain.com 25 我怎样才能打开这个端口的外部连接?