Questions tagged [firewall-cmd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

firewalld centos 8 masquerade log

I am not able to log NATted packets, I tried to do this with a rich rule which indeed is natting packets. rich rules: rule family="ipv4" source address="192.168.188.0/24" ...
0
votes
0answers
70 views

docker-proxy port 5000 not obeying firewall-cmd rules

I am running Red Hat Enterprise Linux 7.9, where I'm trying to block docker-proxy TCP port 5000 via firewall-cmd. I am using the default public zone as the only active zone and have tried the ...
0
votes
2answers
49 views

Firewalld insert rule before ESTABLISHED

I want to ban already established connections. Default iptables rules generated by firewalld -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED,DNAT -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -j ...
0
votes
0answers
95 views

How to add a new zone in firewalld without blocking `port=80/tcp` in `zone=public` in Ubuntu 20.04

I'm not too familiar with firewalld, but I thought I'd try it out on Ubuntu20.04. The problem I'm having is that port=80/tcp in zone=public gets blocked every time I try to add a new zone. So my ...
1
vote
0answers
59 views

Equivalent ipfw config for firewalld

On a system managed by firewalld it is possible to redirect incoming traffic on 443 to 8443 so the process listening doesn't have to run as root to bind to 443 which requires root. firewall-cmd --add-...
0
votes
0answers
175 views

Firewalld will not start on CentOS

I have a CentOS server that I recently ran yum-update on and the only update was to centos-release. I applied the update and ever since FirewallD has been throwing errors. I uninstalled and ...
0
votes
1answer
311 views

Stopping firewall on CentOS 7

I am having a problem with my CentOS 7 server By accident i run command # firewalld Then i found that the log file in /var/log/firewalld was updated with the following 2020-11-26 12:59:08 WARNING: ...
0
votes
0answers
30 views

Firewalld: how are rules of the same priority ordered?

I've been playing with Firewalld and I was wondering about how it does to order rules with the same priority. According to the documentation, it says that there is no guarantee that rules with the ...
0
votes
0answers
110 views

Working Fedora Server 32 suffered power failure and afterward firewalld has lost its config; how can I fix this?

Doing my homework, this Server Fault Question speaks to an identical error message and it might have the same cause, but how I got there is likely different and may provide clues. In my case the ...
1
vote
1answer
478 views

What's the difference between “firewall-cmd --reload” and “systemctl restart firewalld.service”?

What's the difference between "firewall-cmd --reload" and "systemctl restart firewalld"? Hope everyone who will answer this to have a great day!
0
votes
0answers
73 views

Allow TCP traffic on port 3306 from ip range

I have problem with firewall-cmd on Centos 7. I have task: Allow TCP traffic on port 3306 from ip range 192.168.1.0/24, make sure to add this rule as second rule in the chain and second task Allow ...
0
votes
0answers
69 views

How to get an IP address blocked with firewall-cmd with immediate effect?

I am having a problem, with dropping traffic using FirewallD. I start a continuous ping from host1.example.com (192.0.2.101) to host2.example.com (192.0.2.102), and when I execute either of the below ...
0
votes
1answer
454 views

Firewalld still allowing traffic after removing port from zone

I have an issue with firewalld where I opened some ports and now want to close them for example I opened tcp/3000 in the public zone and now want to close it. So far I've tried this firewall-cmd --...
1
vote
1answer
198 views

Restrict all outbound connections to a specific interface, and block if unavailable

I'm running Centos 7 in a VM (I don't believe this should matter, but for context...) Inside the VM, I'm running software to establish a tunnel. I can already accept connections from the host okay, ...
1
vote
1answer
2k views

Port Forward - KVM host forward port 23 to port 22 of a guest running an ssh service

I have a KVM server (host) with multiple virtual machines (guests). My goal is my host forward port 23 to port 22 of a guest running an ssh service. Command example... ssh root@[HOST_IP] -p 23 ...
0
votes
1answer
1k 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
607 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
147 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
86 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
489 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
86 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
1k 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 ...
4
votes
1answer
5k 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
51 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 ...
4
votes
2answers
12k 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
289 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
33 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
11k 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
158 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
426 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
5k 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
890 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 ...
5
votes
1answer
11k 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
2k 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 ...