My question is how can i retain the existing configuration i have with firewalld and also drop all other connections if there is no specific rule for it.
I have the following firewall configuration:
[root@server ~]$ firewall-cmd --get-default-zone
public
[root@server ~]$ firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens192
sources:
services: ssh dhcpv6-client
ports: 123/udp 514/tcp 514/udp 5514/udp 5514/tcp 9200/tcp 9300/tcp 5044/tcp 53/udp 443/tcp 5000/tcp 55000/tcp 1516/tcp 1515/tcp 1514/tcp
protocols:
masquerade: yes
forward-ports: port=514:proto=udp:toport=5514:toaddr=
port=514:proto=tcp:toport=5514:toaddr=
source-ports:
icmp-blocks:
rich rules:
How would i go about using the rules i have configured and still drop by default? Because if i do iptables -L i can see that the default policy is ACCEPT:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
INPUT_direct all -- anywhere anywhere
INPUT_ZONES_SOURCE all -- anywhere anywhere
INPUT_ZONES all -- anywhere anywhere
DROP all -- anywhere anywhere ctstate INVALID
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited