-   Fedora (
-   -   Fedora 18 firewalld specify source ip (

vonedaddy 06-11-2013 08:48 PM

Fedora 18 firewalld specify source ip
With iptables I used to be able to specify a source IP to allow through a port. For example, if I only wanted to allow ssh from

iptables -I INPUT -p tcp -s --dport 22 -j ACCEPT

I just installed Fedora 18 and learned they moved to firewalld by default so I figured when in rome...

I opened the firewall-config dialog and added some ports/services. But I can not find a way to specify a source IP.

Any help?

slipstreamed 06-17-2013 04:14 PM

I don't know if this will help you out but you could try editing the /etc/hosts.allow and hosts.deny file.

slipstreamed 06-18-2013 12:49 AM

Okay i googled some info about firewalld and here is what i came across


Direct options
The direct options are mostly for services and applications to be able to add custom rules. The rules are not saved and have to get resubmitted after reload or restart. The arguments <args> of the passthrough option are the same as the corresponding iptables, ip6tables and ebtables arguments.

Pass a command through to the firewall. <args> can be all iptables, ip6tables and ebtables command line arguments

firewall-cmd --direct --passthrough { ipv4 | ipv6 | eb } <args>

Add a new chain <chain> to a table <table>.

firewall-cmd --direct --add-chain { ipv4 | ipv6 | eb } <table> <chain>
also i found this post explaining how to disable firewalld and revert back to iptables

All times are GMT -5. The time now is 11:07 AM.