add domain name to firewalld source

Support for security such as Firewalls and securing linux
Post Reply
chamberchain
Posts: 1
Joined: 2015/06/25 00:59:43

add domain name to firewalld source

Post by chamberchain » 2015/06/25 01:05:49

I want to add my domain to my trusted zone. but seemingly firewall-cmd don't accept domain name as a source. could anyone help me please.
hope you all can understand my English....

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: add domain name to firewalld source

Post by TrevorH » 2015/06/25 07:26:32

If you use iptables then that will accept the domain name but it's pretty pointless since what it does is look up the domain name at the time you run the iptables command, resolve it to an ip address and then use that ip address in the resulting rule. It does not track changes to the domain name entry so if you update the DNS entry to point to a new IP address then the iptables rule will still point to the old one. The fact that firewall-cmd refuses to do that just means you don't get a false sense of it having worked as you think it might. Domain names are not supported in firewall rules - the DNS lookup for every packet would be too much of an overhead (and if used in a rule about DNS names would lead to a loop!).
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply