Questions tagged [firewall-cmd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

Disable ICMP reply on CentOS 7 firewall, except some IP blocks

I have a Centos 7 machine with FirewallD, and net.ipv4.conf.icmp_echo_ignore_all is set to 0. I'm seeking for some firewall configs to disable ping replies to external IP addresses, but allow some IP ...
0
votes
1answer
42 views

The Firewall-cmd direct rules will remain after deletion

When the firewall is running, I cannot access my website. When I turn it off, it works. I used these rules to redirect port 8443 to regular 443. firewall-cmd --zone=public --permanent --direct --...
0
votes
1answer
20 views

trying to close two ports with firewalld, leaving everything else open

I think I'm using the wrong technique, but not sure of the right one. Machine: Red Hat release 7.2 firewalld.noarch: 0.3.9-14.el7 I've been asked to close two ports but insure that all other ...
0
votes
1answer
78 views

Internal IP forwarding RHEL

Thank you in advance for your response, I've looked on the same question but nowhere to be found, so I'm gonna post here about my question, So I have a RHEL OS and I have 2 separate IP(See Image) ...
0
votes
0answers
141 views

Centos7, firewall-cmd --reload, “COMMAND_FAILED --state requires an argument” How to give state an argument?

I am using Centos7 and have just made some changes to the firewall. I am trying to configure my firewall to filter my ssh connection. I am following the How To documentation on Centos7 How Tos, ...
0
votes
2answers
21 views

Lockdown unsecure port with firewall-cmd

I have a RedHat 7 server where we allow a few ports but one of them is insecure I would like to use firewall-cmd to lock that port down to only allow 5 IPs to access it. Do I need to make a new zone ...
0
votes
1answer
254 views

Issue with firewalld

I just came across this issue and it's late here so I can't really think straight anymore right now. Still this is something pretty simple so I'm not really seeing what I'm missing and just going nuts ...
1
vote
1answer
89 views

Why does firewall-cmd throws error “ALREADY_ENABLED” but is the port not listed when calling firewall-cmd --list-ports?

Using CentOS 7, I am trying to use firewall-cmd --zone=public --add-port=443/tcp --permanent to add 443 to my allowed ports. Unfortunately this throws error ALREADY_ENABLED: 443:tcp. But when I use ...
0
votes
1answer
43 views

CentOS 7 iptables output does match output of firewall-cmd

Output of iptables -L -v -n does not match firewall-cmd --list-all-zones. Specifically, I'm looking for the forwarding rules I have in place for two virtual machines. They can be clearly seen with ...
1
vote
2answers
4k views

Remove --add-forward-port rule in firewall-cmd

Some time ago I added below rule for local port forwarding firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=3000 How can I remove this rule now?
1
vote
1answer
65 views

FirewallD not loading rule after reboot

I have FirewallD on Ubuntu Server 18.04. Got allowed services ssh http ipsec. But on reboot, firewall always allow ssh, ipsec but block http. To solve this, I have to run firewall-cmd --reload every ...
1
vote
0answers
28 views

Add firewall-cmd service permanently [duplicate]

On RHEL 7, I am trying to add service postgresql permanently. Without --permanent option, the command below runs well. [root@sample services]# firewall-cmd --list-services dhcpv6-client http https ...
2
votes
4answers
3k views

How to port forward only on a single host IP address

Short question: How do you enable port forwarding on only a single host ip address? Backstory: My Centos 7 server has 5 ip addresses. Previously I had apache listening on all of them and various ...
0
votes
1answer
139 views

How can I create a top priority firewall rule for a trusted mac address?

I want to accept all packets sent to my centos7 VPS from my device regardless of options defined on public zone. (I want to remove ssh service from public zone and just be able to connect from my mac ...
0
votes
1answer
300 views

centos 7 not allowing inbound tcp connection on port 80 when connected to two network interfaces

I connected two network interfaces to a server running centOS 7 and I configured the public zone to allow inbound tcp connections on port 80 & 443, I then set one of the network interfaces to the ...
1
vote
0answers
4k views

Block outgoing connections on Centos 7 with firewalld

I'm having following rules : public (default, active) interfaces: eth0 sources: services: dhcpv6-client http https ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules:...
1
vote
1answer
458 views

Centos 7 firewall-cmd settings not persisting

I have decided to do a bit of spring cleaning, and am doing a refresh of some of my underlying infrastructure. One of the critical components I am overhauling is the Network Gateway server. I updated ...
4
votes
1answer
8k views

is there a way to flush a whole zone's rich rules on firewalld?

I have added many rich rule with something like this: firewall-cmd --permanent --zone="thezone" --add-rich-rule='rule family=ipv4 source address=1.2.3.4 reject' And now I would like to clear/remove ...
3
votes
1answer
1k views

Fail2ban redirect

I've just finished setting up fail2ban on my Centos reverse proxy server. I was able to get it to block all requests if a certain criteria was met (pretty straight forward). However, I'd now like ...
4
votes
2answers
4k views

Fedora 21: Firewalld (firewall-cmd) won't PERMANENTLY assign interfaces to zones?

I installed Fedora on this one machine which is EXCLUSIVELY a gateway / firewall system. Following installation, I ran 'yum upgrade', and so it should be up to the very latest Fedora 21 - I'm a ...