LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Fedora 18 firewalld specify source ip (https://www.linuxquestions.org/questions/fedora-35/fedora-18-firewalld-specify-source-ip-4175465641/)

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 10.0.0.3

iptables -I INPUT -p tcp -s 10.0.0.3 --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
from https://fedoraproject.org/wiki/FirewallD

Quote:

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.
Quote:

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

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

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

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
http://pantestmb.blogspot.in/2013/04...d-install.html


All times are GMT -5. The time now is 11:50 PM.