Ask Your Question

Configure Source IP in FirewallD Services

asked 2014-02-06 04:51:54 -0500

Elwoood gravatar image

updated 2014-09-29 00:25:23 -0500

mether gravatar image

Hi, i would like to set up a certain ip range that is allowed to use the service from outside in the firewalld. In the graphical userinterface, i can only see the destination. Man page about service config is also not getting me any further. Is this possible or is there another to configure the scenario above? Cheers

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-02-06 20:28:31 -0500

Firewalld groups rules into zones, so the workflow is to add the source range to a zone, then define the rules for the zone. For example:

$ sudo firewall-cmd --permanent --zone="trusted" --add-source=""
$ sudo firewall-cmd --permanent --add-service="ssh"

( You might have to add the interface to the zone as well - I'll update after testing )

edit flag offensive delete link more



sudo firewall-cmd --permanent --zone="trusted" --add-source="" sudo firewall-cmd --permanent --zone="trusted" --add-service="ssh" sudo firewall-cmd --reload

r3432 gravatar imager3432 ( 2015-09-18 03:03:22 -0500 )edit

Question Tools


Asked: 2014-02-06 04:51:54 -0500

Seen: 5,426 times

Last updated: Feb 06 '14