Configuring iptables firewall for FTP server (or TFTP server)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm running an FTP server on an FC12 box (using proftpd) and I've also
enabled the iptables firewall.

I've made the following config changes:

Changed /etc/sysconfig/iptables-config to have:

    IPTABLES_MODULES="nf_conntrack_ftp"


Added /etc/modprobe.d/netfilter.conf and put in it:

    options nf_conntrack_ftp ports=21


(you can probably skip this step, as it looks like the defaults for the
module are correct... unless you're doing some funky port forwarding or
virtual hosting and you're running your server on a relocated port #.)

Added to /etc/sysconfig/iptables:

    -A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

via system-config-firewall by checking "FTP".


And then restarted iptables as "service iptables restart".

Seems to work fine, after some quick tests.

Thought I'd save others the trouble of having to troubleshoot the firewall.

Adding TFTP is similar... put nf_conntrack_tftp into the
IPTABLES_MODULES variable, add "options nf_conntrack_tftp ports=69" to
your netfilter.conf file, and select the service "TFTP" in the firewall
(which generates: -A INPUT -m state --state NEW -m udp -p udp --dport 69
-j ACCEPT).

Thanks,

-Philip



-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux